7.10 KB, patch
|Details | Diff | Splinter Review|
9.45 KB, patch
|Details | Diff | Splinter Review|
2.48 KB, text/plain
2.51 KB, text/plain
20.34 KB, text/plain
The Boehm garbage collector leak detector needs to be integrated with Mozilla. This work is ongoing, and this bug will be used to report status.
Hooking into the 14468 tree at the MLK node. /be
Summary: Boehm Collector Leak Detector → [Porkjockey][MLK]Boehm Collector Leak Detector
Added some keywords (porkjockey, mlk) to summary to make it clearer to pointy heads like me what this was all about.
Summary: [Porkjockey][MLK]Boehm Collector Leak Detector → [Porkjockey]Boehm Collector Leak Detector
Target Milestone: --- → Future
I modified your patches to use the indentation style and naming convention in the file. Please give my patches (attachment id=12576) a try. (I only tested without GC_LEAK_DETECTOR.) Thanks.
More comments on my changes to the original patches (attachment id=12559). 1. I changed the original patches to use the same indentation style and naming convention that are present in the files patched. 2. In the makefiles, prgcleak.c is compiled and linked in only if GC_LEAK_DETECTOR is defined. This is to avoid compiling an empty file. 3. I added a new macro _PT_IS_GCABLE_THREAD(thr), which is defined to be the constant 1 if GC_LEAK_DETECTOR is defined. This way we don't need to figure out where we need to set the PT_THREAD_GCABLE flag in thr->state. I also changed ptthread.c to use the _PT_IS_GCABLE_THREAD(thr) macro. 4. I deleted #if 0 and commented out code. 5. In the makefiles, I changed ../../../dist/lib/libboehm.so to -L$(DIST)/lib -lboehm which is the preferred way to specify a library on the linker command line. 6. The code to get stack frame and stack top (in ptthread.c) is ifdef'd with __GLIBC__ >= 2, because it depends on the definition of jmp_buf in glibc2. 7. Only a copy of prgcleak.c is needed. It will be in mozilla/nsprpub/pr/src/memory/. This will require changes to the Mac project file (prgcleak.c is now in mozilla/nsprpub/pr/src/md/mac/), which I did not address in my patches.
In prgcleak.c, why was 'mutex' changed from a PRLock to a PRMonitor? Do you need it to be a reentrant lock?
We changed the mutex to a monitor because it had to be reentrant.
I checked in my patch and added mozilla/nsprpub/pr/src/memory/prgcleak.c on the NSPRPUB_CLIENT_BRANCH.
Just wanted to note that my checkin was approved by email@example.com for the following reasons: 1. this is to support a useful memory leak detection method on Linux; 2. the changes are conditionalized with the GC_LEAK_DETECTOR macro, so regular builds are not affected.
I fixed a typo ('allocTop' should be 'stackTop') in my previous checkin (on the NSPRPUB_CLIENT_BRANCH). /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptthread.c, revision: 18.104.22.168
All the changes to make Boehm work on Linux have been committed and I just verified that they work in a newly checked out and built tree. Now I'm working on adding more symbolic information, demangling, etc. in the Leak file so it's more equivalent to boehm on the mac.
I merged my patches onto the main trunk. /cvsroot/mozilla/nsprpub/config/config.mk, revision: 3.18 /cvsroot/mozilla/nsprpub/pr/include/private/primpl.h, revision: 3.51 /cvsroot/mozilla/nsprpub/pr/src/Makefile, revision: 3.35 /cvsroot/mozilla/nsprpub/pr/src/Makefile.in, revision: 1.14 /cvsroot/mozilla/nsprpub/pr/src/memory/Makefile, revision: 3.8 /cvsroot/mozilla/nsprpub/pr/src/memory/Makefile.in, revision: 1.9 /cvsroot/mozilla/nsprpub/pr/src/misc/prthinfo.c, revision: 3.8 /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptthread.c, revision: 3.39 I also merged the patches on the NSPRPUB_RELEASE_4_0_BRANCH. /cvsroot/mozilla/nsprpub/config/config.mk, revision: 22.214.171.124 /cvsroot/mozilla/nsprpub/pr/include/private/primpl.h, revision: 126.96.36.199 /cvsroot/mozilla/nsprpub/pr/src/Makefile, revision: 188.8.131.52 /cvsroot/mozilla/nsprpub/pr/src/Makefile.in, revision: 184.108.40.206 /cvsroot/mozilla/nsprpub/pr/src/memory/Makefile, revision: 220.127.116.11 /cvsroot/mozilla/nsprpub/pr/src/memory/Makefile.in, revision: 18.104.22.168 /cvsroot/mozilla/nsprpub/pr/src/memory/prgcleak.c, revision: 22.214.171.124 /cvsroot/mozilla/nsprpub/pr/src/misc/prthinfo.c, revision: 126.96.36.199 /cvsroot/mozilla/nsprpub/pr/src/pthreads/ptthread.c, revision: 188.8.131.52
beard, what do you think the next steps on this one might be??? who should we pull into help? has thesteve taken ownership of the tool? do we have any recent results or analysis from the tool published somewhere? can we round up someone to do that? curt, this might be the next one to plug into daily smoke test runs after we get waterson's reporting tools hoioked up. thanks.
happens on all platforms
OS: Mac System 8.6 → All
Hardware: Macintosh → All
SEGV result of attempt to run a program built with --enable-boehm (after Makefile's were munged to do -lboehm).
Component: XP Miscellany → NSPR
Product: Core → NSPR
Target Milestone: Future → ---
Version: Trunk → 4.0
Marked the bug fixed based on comment 16.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.