Closed Bug 980109 Opened 11 years ago Closed 11 years ago

ScopedXPCOM leaks tlsPseudoStack through shutdown

Categories

(Core :: Gecko Profiler, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1047124

People

(Reporter: mccr8, Unassigned)

References

(Blocks 1 open bug)

Details

A stack like this shows up many times when the CPP unit tests are run with LSAN: ==2654==ERROR: LeakSanitizer: detected memory leaks Direct leak of 32856 byte(s) in 1 object(s) allocated from: #0 0x4463f5 in __interceptor_malloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74 #1 0x7f4a408aab18 in moz_xmalloc /somedir/memory/mozalloc/mozalloc.cpp:52 #2 0x7f4a41bd9ba3 in profiler_init /somedir/obj-firefox/xpcom/build/../../dist/include/GeckoProfilerImpl.h:59 #3 0x7f4a41bd9ba3 in NS_InitXPCOM2 /somedir/xpcom/build/nsXPComInit.cpp:406 #4 0x45ae11 in ScopedXPCOM /somedir/xpcom/tests/TestHarness.h:110 #5 0x45ae11 in ScopedXPCOM /somedir/xpcom/tests/TestHarness.h:117 #6 0x45ae11 in main /somedir/xpcom/tests/TestDeque.cpp:233 #7 0x7f4a3f24976c (/lib/x86_64-linux-gnu/libc.so.6+0x2176c) SUMMARY: LeakSanitizer: 32856 byte(s) leaked in 1 allocation(s). I'm guessing this is the allocation of the pseudostack in mozilla_sampler_init, and that ScopedXPCOM is missing a matching call to profiler_shutdown(). This doesn't seem like a real issue, but it would be nice to clear out a bit of noise if the fix is easy. If not, I can add this to the suppression list.
Oh maybe this explains it (from the end of mozilla_sampler_shutdown): 548 // We can't delete the Stack because we can be between a 549 // sampler call_enter/call_exit point. 550 // TODO Need to find a safe time to delete Stack Suppression list it is, I guess.
It's not impossible but not easy. I admit I do hate introducing this kind of noise :(.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
Depends on: 1047124
Hooray! Bug 1047124 fixed the leak and removed the suppression.
No longer depends on: 1047124
Resolution: WONTFIX → DUPLICATE
You need to log in before you can comment on or make changes to this bug.