[Gc] GC 6.2 on IRIX64 6.5
hans.boehm at hp.com
Thu Apr 15 14:17:26 PDT 2004
Can you ask him to confirm that this still happens with 6.3alpha5?
This SEGV is expected, and should be caught. My guess is that 6.2 on Irix
used longjmp instead of siglongjmp to jump out of the signal handler, and
thus the kernel thought the process was still in the signal handler. Somehow
this information was preserved across the exec (possibly a kernel misfeature),
and when the child generates its SIGSEGV, the kernel thinks the SIGSEGV was generated
inside a SIGSEGV handler, and hence kills the process.
I haven't seen this problem reported before, but the code was changed in the meantime,
since it didn't look correct to me. If my theory is correct, 6.3alpha5 should
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com]On Behalf Of Shiro Kawai
> Sent: Thursday, April 15, 2004 5:43 AM
> To: gc at napali.hpl.hp.com
> Cc: shiro at acm.org
> Subject: [Gc] GC 6.2 on IRIX64 6.5
> A friend of mine experiences a problem using GC 6.2 on IRIX64 6.5.
> I don't have the environment to confirm. Has anybody seen a similar
> Symptom: when a program that uses GC forks another program
> that also uses GC, the forked program keeps receiving SIGSEGV
> at os_dep.c:806 and killed by the OS.
> To reproduce the symptom, run the following program
> linked with libgc. It calls itself via system(3).
> DONT_ADD_BYTE_AT_END is defined. Pthread is not used.
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> #include "gc.h"
> main(int argc, char *argv)
> char *x,*a;
> int n,sig=0;
> a = (argc > 1) ? strdup(argv) : strdup("hoge?");
> n = strlen(a);
> x = (char*) GC_malloc_atomic((n+1)*sizeof(char));
> printf("%s\n", x);
> sig = system("./hoge.out inside");
> printf("hoge.out returned: %d\n", sig);
> return 0;
> On Linux, it invokes itself recursively until interrupted
> manually. On IRIX, the child process is killed immediately.
> shell$ gcc -I./include gc_hoge.c .libs/libgc.a -o hoge.out
> shell$ ./hoge.out "keke?"
> hoge.out returned: 9
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc