Re[4]: [Gc] crash in GC_free

Ivan Maidanski ivmai at mail.ru
Tue Jun 2 11:17:15 PDT 2009


Hi!

Jerry Hughes <hughesjerry369 at gmail.com> wrote:
> Hi,
> 
> > Hi!
> >
> > Jerry Hughes <hughesjerry369 at gmail.com> wrote:
> >> Hi,
> >>
> >> I haven't managed to build gc v6.8 on my Mac. I get that when I try
> >> and build it :
> >> ../darwin_stop_world.c: In function 'GC_push_all_stacks':
> >> ../darwin_stop_world.c:105: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'esp'
> >> ../darwin_stop_world.c:107: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'eax'
> >> ../darwin_stop_world.c:108: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'ebx'
> >> ../darwin_stop_world.c:109: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'ecx'
> >> ../darwin_stop_world.c:110: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'edx'
> >> ../darwin_stop_world.c:111: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'edi'
> >> ../darwin_stop_world.c:112: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'esi'
> >> ../darwin_stop_world.c:113: error: 'i386_thread_state_t' has no  
> >> member
> >> named 'ebp'
> >
> > Yes. That version (thread support, to be precise) is for older OS X.
> >
> > Do You need thread support. If not, try without -DGC_THREADS.
> 
> Not yet, but I will.

First try without thread support. If everything works Ok then recompile with threads.

> 
> >
> >
> > OK. Revert back to v7.1 (or, better, fetch the latest CVS snapshot -  
> > is should be safer than any of v7 versions).
> >
> >>
> >> I tried test.c That seemed to be a good idea, I got an error:
> >> "GC_is_visible produced wrong failure indication"
> >
> > This means the problem is in the gc itself.

First make test.c not to fail (on your platform) otherwise don't expect your app will work...

> >
> > Your Mac is not on PPC, right?
> 
> Right
> 
> >
> >
> >>
> >> If I just include gc.h, I get the same problem.
> >>
> >> What is "bt"? I guess you'd like some more debugging info.  
> >> Actually, I
> >> don't know how the debugger got me all the info. It did only a couple
> >> times. Now I only have the compiled code and the stack saying it
> >> crashed in GC_free. The couple times I got full debugging info, hhdr
> >> was null and that crashed on line 412:     sz = hhdr -> hb_sz;
> >
> > "bt" is gdb "backrace" command. It shows calls stack for the current  
> > thread.
> >
> 
> Here is the bt:
> 
> #0  0x0004c6c5 in GC_free () at main/main.cpp:28
> #1  0x0004d045 in operator delete () at main/main.cpp:28
> #2  0x96f60748 in HIObject::HandleClassHIObjectEvent ()
> #3  0x96f605b3 in HIObject::EventHook ()
> #4  0x96f6011d in DispatchEventToHandlers ()
> ....
> #51 0x0035e2fd in QEventLoop::exec ()
> #52 0x0036214e in QCoreApplication::exec ()
> #53 0x00009184 in main (argc=1, argv=0xbffff700) at main/main.cpp:27

For simplicity, make GC_free() a NOP.

> ...
> > Jerry

Bye.


More information about the Gc mailing list