[Gc] Status of gc on Mac OS X - gc_cpp issue
hans.boehm at hp.com
Wed Oct 4 17:53:51 PDT 2006
I think it's pretty clear why this shouldn't be happening:
gc_cpp.cc defines an operator delete that calls GC_FREE. Apparently the standard operator delete is called instead of that one. According to the C++ standard (188.8.131.52), I believe the one in gc_cpp.cc should get called.
Unfortunately, in order for this interface to work correctly, operators new and delete really need to be intercepted somehow. However, this is a brittle spot on several platforms. Alternate suggestions/patches are appreciated.
It might be that in this case there is a linker option that changes the behavior?
> -----Original Message-----
> From: gc-bounces at napali.hpl.hp.com
> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Renaud Blanch
> Sent: Wednesday, October 04, 2006 8:01 AM
> To: gc at napali.hpl.hp.com
> Subject: Re: [Gc] Status of gc on Mac OS X - gc_cpp issue
> Le 29 sept. 06 à 15:01, Renaud Blanch a écrit :
> > Le 28 sept. 06 à 23:02, Boehm, Hans a écrit :
> >> 2) It looks like test_cpp is invoking the system free when it
> >> shouldn't.
> >> The next step here would be to look at the stack trace
> when the error
> >> message is printed to see where the free call is coming
> from. This
> >> looks like a problem that's specific to the gc_cpp.h C++
> >> probably related to replacing ::new and friends.
> > Provided the patch above, make check reports "All 5 tests passed"
> > when configured with --enable-threads=posix and --enable-cplusplus.
> > However, there is still a bunch of line like this in the output :
> > test_cpp(23980) malloc: *** Deallocation of a pointer not
> > malloced: 0x4640f8; This could be a double free(), or free() called
> > with the middle of an allocated block; Try setting environment
> > variable MallocHelp to see tools to help debug
> after looking at the stack trace, it seems that free call is
> triggered at the end of test_cpp when deleting the
> uncollectable As (tests/test_cpp.cc, line 264).
> apparently, this is the only call to free.
> any hints ?
> >>> -----Original Message-----
> >>> From: gc-bounces at napali.hpl.hp.com
> >>> [mailto:gc-bounces at napali.hpl.hp.com] On Behalf Of Renaud Blanch
> >>> Sent: Thursday, September 28, 2006 12:22 AM
> >>> To: gc at napali.hpl.hp.com
> >>> Subject: [Gc] Status of gc on Mac OS X running on intel proc ?
> >>> Hello,
> >>> I was successfully using gc6.8 on a PPC PowerBook and on
> a dual G5
> >>> Mac running Mac OS X version 10.4.
> >>> I switched to an Intel dual core MacBook Pro a few weeks ago.
> >>> Basic make check reports failures on Mac OS X while it
> works fine on
> >>> the same machine running linux (ubuntu with a SMP kernel).
> >>> Has anybody reported similar problems or conversely
> reported success
> >>> in using the gc on intel (dual core) based machine
> running Mac OS X
> >>> ?
> >>> Thanks.
> >>> In case it helps, you will find below the configure and
> make check
> >>> logs for gc6.8 & gc7.0alpha7 for both linux & Mac OS X runs.
> >>> I will happily collaborate with people motivated to
> provide patch to
> >>> the gc in order to make it work for intel macs.
> >>> If some body can point me in the right direction, and
> give me some
> >>> hints, I am also motivated to contribute !
> >>> regards,
> >>> Renaud
> Gc mailing list
> Gc at linux.hpl.hp.com
More information about the Gc