| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| Message-ID: | <63340-220021221016341397@M2W082.mail2web.com> |
| X-Priority: | 3 |
| Reply-To: | lhall AT rfk DOT com |
| X-Originating-IP: | 209.113.174.244 |
| From: | "lhall AT pop DOT ma DOT ultranet DOT com" <lhall AT pop DOT ma DOT ultranet DOT com> |
| To: | oreste DOT bernardi AT st DOT com, cygwin AT cygwin DOT com |
| Subject: | RE: SIGSEGV when called sem_init() with gdb. |
| Date: | Tue, 10 Dec 2002 11:03:41 -0500 |
| MIME-Version: | 1.0 |
| X-OriginalArrivalTime: | 10 Dec 2002 16:03:41.0474 (UTC) FILETIME=[B55D8020:01C2A065] |
| X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id gBAG40B22766 |
Rerun setup and update your gdb. If that doesn't help,
let the list know.
Larry
Original Message:
-----------------
From: Oreste Bernardi oreste DOT bernardi AT st DOT com
Date: Tue, 10 Dec 2002 16:01:16 +0100
To: cygwin AT cygwin DOT com
Subject: SIGSEGV when called sem_init() with gdb.
Dear, all
#include <semaphore.h>
int main () {
int p;
sem_t sem;
int i=0,d;
//sem=(sem_t)NULL; //With this There isn't any problem
sem_init (&sem,0,1);
sem_post (&sem);
sem_wait(&sem);
return i;
}
cygwin 1.3.17-1
gcc 3.2-3
gdb 20010428-3
When executing this source code with gdb I get an SIGSEGV signal when
sem_init() function is called.
If I continue on, program works fine.
If program is not executed from gdb, it works without any error.
If I initialize it with NULL, I don't get any error.
I think that is the same behavior as described by following mail:
http://sources.redhat.com/ml/cygwin/2002-10/msg00956.html
Is this true ?
To avoid annoying gdb error message, is my solution ("sem=(sem_t)NULL")
reliable and portable ?
Best Regards
Oreste Bernardi
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |