[Gc] Occasionally crash with GraphicsMagick, ImageMagick.

Boehm, Hans hans.boehm at hp.com
Wed May 5 12:32:07 PDT 2010


My guess is that you are deallocating an object that was allocated using the system malloc or some other means.  You can confirm by invoking GC_base on the objects that's about to be deallocated.  If it returns 0, it doesn't belong to the collector.

The object may be allocated in some other library, where you are not intercepting calls.  Or you might be allocating using other libc calls, like strdup() or memalign(), that you are not currently intercepting.

Hans

> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com 
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Shi Jie Gung
> Sent: Wednesday, May 05, 2010 2:29 AM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Occasionally crash with GraphicsMagick, ImageMagick.
> 
> 
> 
> 
> 
> ----- Original Message ----
> > From: Ivan Maidanski <ivmai at mail.ru>
> > To: Shi Jie Gung <ksc91u_fr at yahoo.fr>
> > Cc: gc at linux.hpl.hp.com
> > Sent: Wed, May 5, 2010 1:51:42 PM
> > Subject: Re: [Gc] Occasionally crash with GraphicsMagick, 
> ImageMagick.
> > 
> > 
> Wed, 5 May 2010 02:11:30 +0000 (GMT) Shi Jie Gung <
> > ymailto="mailto:ksc91u_fr at yahoo.fr" 
> > href="mailto:ksc91u_fr at yahoo.fr">ksc91u_fr at yahoo.fr>:
> 
> 
> Hello, now I build with gc from cvs.
> #define GC_DEBUG 
> 
> > 
> > int main(int argc, char** argv)
> > {
> >     #ifdef GC_DEBUG
> 
> > Call GC_set_find_leak(1)
> > here
> 
> >     GC_init();
> >    
> >  
> >    /*GM*/
> >    
> > /*MagickAllocFunctions(GC_free,GC_malloc,GC_realloc);*/
> and use these functions
> MagickAllocFunctions(GC_debug_free,\
>             GC_debug_malloc_replacement,\
>             GC_debug_realloc_replacement);
> > It would be good
> > to use GC_debug_free (and friends) here and below. (It's 
> probably not 
> > a problem to mix debug and non-debug version but...)
> 
> 
> crash like this.
> 
> GC_debug_realloc: found smashed location at 0x100b9f1c8 in or 
> near object at 0x100b9b020(unknown:0, sz=16800)
> GC_debug_free: found smashed location at 0x100b9f1c8 in or 
> near object at 0x100b9b020(unknown:0, sz=16800)
> Attempt to free invalid pointer 0x100b9b020
> free(invalid pointer)
> 
> Program received signal SIGABRT, Aborted.
> 0x00007fff8441d886 in __kill ()
> (gdb) bt
> #0  0x00007fff8441d886 in __kill ()
> #1  0x00007fff844bdeae in abort ()
> #2  0x000000010026d5f0 in GC_abort ()
> #3  0x0000000100262c7e in GC_debug_free ()
> #4  0x000000010008f57a in DestroyCacheNexus ()
> #5  0x000000010008f5cb in CloseCacheView ()
> #6  0x000000010008f684 in DestroyThreadViewSet ()
> #7  0x000000010007db8a in DestroyImage ()
> #8  0x00000001000aba5f in ResizeImage ()
> #9  0x0000000100000eb3 in main (argc=2, argv=0x7fff5fbff240) 
> at main.cpp:77
> Thanks for your help.
> 
> 
>       
> _______________________________________________
> 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