LSAN-detected leaks in the profiler

RESOLVED FIXED in Firefox 39

Status

()

Core
Gecko Profiler
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: shu, Unassigned)

Tracking

unspecified
mozilla39
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(firefox39 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

I love manual memory management...
(Reporter)

Comment 3

3 years ago
Created attachment 8573597 [details] [diff] [review]
Stop leaking mThreadNameFilters in the profiler.
Attachment #8573597 - Flags: review?(mstange)
Comment on attachment 8573597 [details] [diff] [review]
Stop leaking mThreadNameFilters in the profiler.

I think UniquePtr<char> ends up doing delete theChar, and not delete[] or free(). I think what we need here is free(). Can you try using an nsString or nsCString or std::string instead?
Attachment #8573597 - Flags: review?(mstange)
(Reporter)

Comment 5

3 years ago
Created attachment 8573607 [details] [diff] [review]
Stop leaking mThreadNameFilters in the profiler.
Attachment #8573597 - Attachment is obsolete: true
Attachment #8573607 - Flags: review?(mstange)
Comment on attachment 8573607 [details] [diff] [review]
Stop leaking mThreadNameFilters in the profiler.

Review of attachment 8573607 [details] [diff] [review]:
-----------------------------------------------------------------

::: tools/profiler/TableTicker.h
@@ +9,5 @@
>  #include "platform.h"
>  #include "ProfileEntry.h"
>  #include "mozilla/Mutex.h"
> +#include "mozilla/Vector.h"
> +#include "mozilla/UniquePtr.h"

Looks like you don't need this anymore.
Attachment #8573607 - Flags: review?(mstange) → review+
(In reply to Markus Stange [:mstange] from comment #4)
> I think UniquePtr<char> ends up doing delete theChar, and not delete[] or
> free(). I think what we need here is free(). Can you try using an nsString
> or nsCString or std::string instead?

It's also possible to use UniquePtr with a deleter class that calls free(), if a string class won't work here.
https://hg.mozilla.org/mozilla-central/rev/e42a8febca65
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox39: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.