[Gc] Segmentation fault in `GC_clear_stack_inner ()'

Boehm, Hans hans.boehm at hp.com
Wed Apr 19 10:31:13 PDT 2006


This usually means that you are invoking the collector from a stack that the collector doesn't know about, e.g. because the collector is configured without threads, but you have a multithreaded application. GC_clear_stack_inner() is supposed to recurse, clearing a local array, until it hits a limit.  This is designed to overwrite old values on the stack occasionally.  In this case I expect that the limit is far removed from the current stack pointer, and probably in a different stack.

Hans
 

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Ludovic Courtès
> Sent: Tuesday, April 18, 2006 8:26 AM
> To: gc at napali.hpl.hp.com
> Subject: [Gc] Segmentation fault in `GC_clear_stack_inner ()'
> 
> Hi,
> 
> I'm experiencing a segmentation fault with libgc which is 
> probably due to a bug in my program.  However, I'd like to 
> know whether is the symptom is easily recognizable.  Here is 
> what GDB tells me:
> 
>   #0  GC_clear_stack_inner (arg=0x1002cff0 "", 
> limit=813891936) at misc.c:270
>   #1  0x0feb4934 in GC_clear_stack_inner (arg=0x1002cff0 "", 
> limit=813891936)
>       at misc.c:275
>   #2  0x0feb4934 in GC_clear_stack_inner (arg=0x1002cff0 "", 
> limit=813891936)
>       at misc.c:275
>   #3  0x0feb4934 in GC_clear_stack_inner (arg=0x1002cff0 "", 
> limit=813891936)
>       at misc.c:275
>   #4  0x0feb4934 in GC_clear_stack_inner (arg=0x1002cff0 "", 
> limit=813891936)
>   ...
> 
> And so on, and so forth.  Additionally:
> 
>   (gdb) info local
>   dummy = {0 <repeats 213 times>}
> 
> This occurs with version 6.6 on `powerpc-unknown-linux-gnu' 
> and not on `i686-pc-linux-gnu' nor `sparc64-*-linux-gnu'.
> 
> Any hint?
> 
> Thanks,
> Ludovic.
> 
> _______________________________________________
> Gc mailing list
> Gc at linux.hpl.hp.com
> http://www.hpl.hp.com/hosted/linux/mail-archives/gc/
> 



More information about the Gc mailing list