This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 64bit: segfault on program exit


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]