This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: 64bit: segfault on program exit
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Sat, 6 Apr 2013 23:10:49 +0200
- Subject: Re: 64bit: segfault on program exit
- References: <5159A39B dot 6020102 at gmail dot com> <20130402085923 dot GA7108 at calimero dot vinschen dot de> <515C2F00 dot 1000401 at gmail dot com> <20130403142202 dot GF31598 at calimero dot vinschen dot de> <51607B09 dot 2010103 at gmail dot com>
- Reply-to: cygwin-apps at cygwin dot com
On Apr 6 21:44, marco atzeri wrote:
> On 4/3/2013 4:22 PM, Corinna Vinschen wrote:
> >On Apr 3 15:30, marco atzeri wrote:
> >>On 4/2/2013 10:59 AM, Corinna Vinschen wrote:
>
> >The crash occurs in a forked process, I guess. Since you're building
> >the stuff yourself, maybe you can try some serious `printf' based
> >debugging?
>
> very curious, this test
> if (n == -1)
>
> does not work as "n" is ssize_t = long
I don't understand what you mean. I tried this:
#include <stdio.h>
#include <sys/types.h>
$ cat > x.c <<EOF
int
main ()
{
ssize_t i = -1L;
if (i == -1)
printf ("i == -1\n");
else
printf ("i NOT -1\n");
return 0;
}
EOF
$ gcc -o x x.c
$ ./x
i == -1
so i == -1 with i of type ssize_t works fine.
What is the original code doing?
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat