Closed Bug 573268 Opened 14 years ago Closed 14 years ago

Intentional XPT leak interferes with leak debugging

Categories

(Core :: XPCOM, defect)

defect
Not set
major

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+

People

(Reporter: jruderman, Assigned: benjamin)

References

Details

(Keywords: memory-leak, regression)

Attachments

(2 files)

See bug 570488 comment 10 forward.  It should probably just be made not to leak, since that's what we do with everything else, but I'd settle for not leaking if compiled with { --enable-logrefcnt, --enable-valgrind, --enable-trace-malloc }.
Assignee: nobody → benjamin
Status: NEW → ASSIGNED
Attachment #455465 - Flags: review?(dbaron)
Comment on attachment 455465 [details] [diff] [review]
Destroy the arena in trace-malloc builds, rev. 1

>+#if defined(NS_TRACE_MALLOC)

defined(NS_TRACE_MALLOC) || defined(NS_BUILD_REFCNT_LOGGING)

>+#define NS_FREE_PERMANENT_DATA
>+#endif
>-    // Don't destroy the arena; we're shutting down, why touch the
>-    // memory when we don't have to?
>+#ifdef NS_FREE_PERMANENT_DATA
>+    XPT_DestroyArena(gXPTIStructData);
>+#endif
> }        

Maybe good to leave the comment, slightly reformulated?  (Or maybe, even better, add a little more explanation of the same above NS_FREE_PERMANENT_DATA to explain why it exists?)

r=dbaron with that
Attachment #455465 - Flags: review?(dbaron) → review+
Also || defined(MOZ_VALGRIND)?
http://hg.mozilla.org/mozilla-central/rev/fd1592c0dae1
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
This patch added a //-style comment to nscore.h, which makes us spam build warnings for .c files that include nscore.h (e.g. pldhash.c)

Attached followup switches the comment to be /**/-style.
Attachment #459926 - Flags: review?(dbaron)
Comment on attachment 459926 [details] [diff] [review]
trivial followup: use c-style (not c++-style) comment in nscore.h

r=dbaron
Attachment #459926 - Flags: review?(dbaron) → review+
blocking2.0: ? → final+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: