Closed
Bug 980625
Opened 11 years ago
Closed 11 years ago
Plugin child leaks detected by LSAN
Categories
(Core Graveyard :: Plug-ins, defect)
Core Graveyard
Plug-ins
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla30
People
(Reporter: mccr8, Assigned: johns)
References
(Blocks 1 open bug)
Details
(Whiteboard: [lsan])
Attachments
(5 files, 2 obsolete files)
12.83 KB,
text/plain
|
Details | |
1.40 KB,
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
1.39 KB,
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
31.64 KB,
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
3.25 KB,
patch
|
jaas
:
review+
|
Details | Diff | Splinter Review |
This is from an M1 run. I don't know how important this might be.
Assignee | ||
Comment 1•11 years ago
|
||
There appear to be two leaks here, neither very serious:
- No destructor cleans up various things created in PluginModuleChild::Init. ModuleChild is 1:1 with the process so these isn't "really" a leak
- The test plugin, which is only used in the test suite, has a leak in scriptableHasProperty.
Assignee | ||
Comment 2•11 years ago
|
||
Fixes the nptest leak
Assignee | ||
Comment 3•11 years ago
|
||
Fixes Init leak - nsPluginFile is a struct, needs to have FreePluginInfo() called on it
Reporter | ||
Comment 4•11 years ago
|
||
for the record, one or both of these patches don't seem to build
Reporter | ||
Comment 5•11 years ago
|
||
This at least makes it compile (not actually a patch):
+++ b/dom/plugins/ipc/PluginModuleChild.cpp
@@ -182,7 +182,7 @@ PluginModuleChild::Init(const std::string& aPluginFilename,
- FreePluginInfo(info);
+ pluginFile.FreePluginInfo(info);
Reporter | ||
Comment 6•11 years ago
|
||
These patches do fix the leaks I was seeing. There's still this from the plugin process, but it is pretty useless:
Direct leak of 24 byte(s) in 1 object(s) allocated from:
#0 0x440995 in malloc (/home/amccreight/ff-dbg-asan/dist/bin/plugin-container+0x440995)
#1 0x7f023901ee08 in moz_xmalloc /home/amccreight/mc/memory/mozalloc/mozalloc.cpp:52
Assignee | ||
Comment 7•11 years ago
|
||
Version that compiles
Attachment #8387242 -
Attachment is obsolete: true
Assignee | ||
Comment 8•11 years ago
|
||
Version that ACTUALLY compiles after I attached the same exact patch twice!
Attachment #8387867 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Attachment #8387237 -
Flags: review?(joshmoz)
Assignee | ||
Updated•11 years ago
|
Attachment #8387870 -
Flags: review?(joshmoz)
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → jschoenick
Status: NEW → ASSIGNED
Reporter | ||
Comment 9•11 years ago
|
||
Here's another test plugin leak:
Direct leak of 835 byte(s) in 17 object(s) allocated from:
#0 0x446395 in malloc /builds/slave/moz-toolchain/src/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:74
#1 0x7f5f48635b3d in moz_xmalloc /builds/slave/try-l64-asan-00000000000000000/build/memory/mozalloc/mozalloc.cpp:52
#2 0x7f5f1a9e9d33 in c_str /builds/slave/try-l64-asan-00000000000000000/build/dom/plugins/test/testplugin/javaplugin/../nptest.cpp:1770
#3 0x7f5f1a9e9d33 in getJavaCodebase(NPObject*, _NPVariant const*, unsigned int, _NPVariant*) /builds/slave/try-l64-asan-00000000000000000/build/dom/plugins/test/testplugin/javaplugin/../nptest.cpp:2914
#4 0x7f5f1a9d5190 in scriptableInvoke(NPObject*, void*, _NPVariant const*, unsigned int, _NPVariant*) /builds/slave/try-l64-asan-00000000000000000/build/dom/plugins/test/testplugin/javaplugin/../nptest.cpp:2005
19 #5 0x7f5f404f6e66 in CallNPMethodInternal(JSContext*, JS::Handle<JSObject*>, unsigned int, JS::Value*, JS::Value*, bool) /builds/slave/try-l64-asan-00000000000000000/build/dom/plugins/base/nsJSNPRuntime.cpp:1393
Assignee | ||
Comment 11•11 years ago
|
||
This macro expansion will double-evaluate NPN_StrDup and leak a string
Attachment #8389346 -
Flags: review?(joshmoz)
Attachment #8389340 -
Flags: review?(joshmoz) → review+
Attachment #8389346 -
Flags: review?(joshmoz) → review+
Attachment #8387237 -
Flags: review?(joshmoz) → review+
Attachment #8387870 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 12•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/763eb7c32075
https://hg.mozilla.org/mozilla-central/rev/56ff5e931815
https://hg.mozilla.org/mozilla-central/rev/a617b3b88132
https://hg.mozilla.org/mozilla-central/rev/549cc0c0672f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•