Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 50916 - Memory corruption using Boehm GC in C++ application
Summary: Memory corruption using Boehm GC in C++ application
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mamoru KOMACHI (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-13 03:40 UTC by jeek
Modified: 2005-02-04 21:37 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jeek 2004-05-13 03:40:58 UTC
Not sure who upstream maintainer for Boehm GC is, so reporting this here.

I'm experiencing repeatable memory corruption with Boehm GC 6.2r1 in my C++ application. Gdb watchpoint confirms that Boehm GC is replacing a GC_malloc'd pointer with an invalid address that then causes a SEGV later on. Application runs correctly when not linked against libgc (and valgrind reports no errors).

I'm happy to try to help diagnose this but I'm not sure how to proceed - please let me know what futher information is needed.

-- jeek
Comment 1 Mamoru KOMACHI (RETIRED) gentoo-dev 2004-05-14 02:49:25 UTC
I've just committed the latest snapshot of boehm-gc, 6.3-alpha5.
If that doesn't solve the problem, please report it to
gc@linux.hpl.hp.com. See http://www.hpl.hp.com/personal/Hans_Boehm/gc/
for how to subscribe the list.
Comment 2 jeek 2004-05-14 03:27:51 UTC
I've discovered that the problem was provoked by allocating a particular object from the regular C++ heap rather than from the garbage collected pool. Changing this particlar allocations causes the corruption to go away. I suspect it's still a bug though as I expect to be able to mix allocations from regular g++ new and Boehm GC_malloc in the same process.

-- jeek
Comment 3 jeek 2004-05-14 03:29:25 UTC
Oops - didn't spot your suggestion to upgrade - will check out the new version and let you know.

Thanks,
-- jeek
Comment 4 Mamoru KOMACHI (RETIRED) gentoo-dev 2005-02-04 21:37:28 UTC
Please take it to upstream if the problem still persists with boehm-gc-6.4.