Closed Bug 525573 Opened 15 years ago Closed 15 years ago

TestHarness.h doesn't initialize nsTraceMalloc in NS_TRACE_MALLOC builds

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 529134

People

(Reporter: cjones, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

This causes nsTraceMalloc not to allocate its PRLock, which in turn causes it to not protect its shared state.

This is very bad for multi-threaded unit tests in DEBUG builds: the deadlock detector uses nsTraceMalloc to get backtraces.  With new code I'm adding, I can cause an infinite loop in nsTraceMalloc due to state corruption in about 1/2 runs (on my machine with 16 HW threads).
Attachment #409439 - Flags: review? → review?(jwalden+bmo)
Attachment #409439 - Flags: review?(jwalden+bmo) → review+
Pushed http://hg.mozilla.org/mozilla-central/rev/247abc20a78b
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
This fails to link on OS X/Windows debug/libxul/tracemalloc, although everything is hunky dory on Linux for reasons beyond my ken.  Looking into build hackery.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I just confirmed that the OS X build error is caused by content/base/test *not* linking against libxul, while xpcom/test *is*.  Trying to determine how it's magically working on linux.
With bug 529134, trace-malloc will be implicitly initialized, so this bug is no longer necessary.

I really want RESOLVED -> SUBSUMED.
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: