[Porkjockey]Boehm Collector Leak Detector

RESOLVED FIXED

Status

defect
P3
major
RESOLVED FIXED
20 years ago
10 years ago

People

(Reporter: beard, Assigned: wtc)

Tracking

({memory-leak})

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(5 attachments)

Reporter

Description

20 years ago
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.
Blocks: 14516
Hooking into the 14468 tree at the MLK node.

/be
Reporter

Updated

20 years ago
Status: NEW → ASSIGNED

Updated

20 years ago
Blocks: 16950

Updated

20 years ago
Summary: Boehm Collector Leak Detector → [Porkjockey][MLK]Boehm Collector Leak Detector

Comment 2

20 years ago
Added some keywords (porkjockey, mlk) to summary to make it clearer to pointy
heads like me what this was all about.

Updated

20 years ago
Keywords: mlk

Updated

20 years ago
Summary: [Porkjockey][MLK]Boehm Collector Leak Detector → [Porkjockey]Boehm Collector Leak Detector
Reporter

Comment 3

19 years ago
Updated milestone.
Target Milestone: --- → Future
Assignee

Comment 5

19 years ago
Assignee

Comment 6

19 years ago
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.
Assignee

Comment 7

19 years ago
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.
Assignee

Comment 9

19 years ago
In prgcleak.c, why was 'mutex' changed from a PRLock
to a PRMonitor?  Do you need it to be a reentrant lock?

Comment 11

19 years ago
We changed the mutex to a monitor because it had to be reentrant.
Assignee

Comment 12

19 years ago
I checked in my patch and added mozilla/nsprpub/pr/src/memory/prgcleak.c
on the NSPRPUB_CLIENT_BRANCH.
Assignee

Comment 13

19 years ago
Just wanted to note that my checkin was approved
by jar@netscape.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.
Assignee

Comment 14

19 years ago
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: 3.33.2.2

Comment 15

19 years ago
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.
Assignee

Comment 16

19 years ago
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: 3.14.6.2
/cvsroot/mozilla/nsprpub/pr/include/private/primpl.h, revision: 3.34.4.8
/cvsroot/mozilla/nsprpub/pr/src/Makefile, revision: 3.29.2.4
/cvsroot/mozilla/nsprpub/pr/src/Makefile.in, revision: 1.8.6.3
/cvsroot/mozilla/nsprpub/pr/src/memory/Makefile, revision: 3.5.6.1
/cvsroot/mozilla/nsprpub/pr/src/memory/Makefile.in, revision: 1.6.6.1
/cvsroot/mozilla/nsprpub/pr/src/memory/prgcleak.c, revision: 1.1.4.1
/cvsroot/mozilla/nsprpub/pr/src/misc/prthinfo.c, revision: 3.4.8.2
/cvsroot/mozilla/nsprpub/pr/src/pthreads/ptthread.c, revision: 3.32.4.3

Comment 17

19 years ago
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.

Updated

18 years ago
Blocks: 92580

Updated

18 years ago
No longer blocks: 92580
happens on all platforms
OS: Mac System 8.6 → All
Hardware: Macintosh → All

Comment 19

15 years ago
SEGV result of attempt to run a program built with --enable-boehm (after
Makefile's were munged to do -lboehm).

Updated

14 years ago
Component: XP Miscellany → NSPR
Product: Core → NSPR
Target Milestone: Future → ---
Version: Trunk → 4.0
QA Contact: brendan → nspr
Assignee: beard → wtc
Status: ASSIGNED → NEW
Assignee

Comment 20

10 years ago
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.