Closed Bug 1140059 Opened 9 years ago Closed 9 years ago

LSAN-detected leaks in the profiler

Categories

(Core :: Gecko Profiler, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: shu, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

I love manual memory management...
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)
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
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: