RESOLVED FIXED 204384
[JSC] Work-around Leaks' false-positive report about memory leaking
https://bugs.webkit.org/show_bug.cgi?id=204384
Summary [JSC] Work-around Leaks' false-positive report about memory leaking
Yusuke Suzuki
Reported 2019-11-19 15:56:46 PST
[JSC] Work-around Leaks' false-positive report about memory leaking
Attachments
Patch (3.08 KB, patch)
2019-11-19 16:00 PST, Yusuke Suzuki
mark.lam: review+
Yusuke Suzuki
Comment 1 2019-11-19 16:00:19 PST
Yusuke Suzuki
Comment 2 2019-11-19 16:00:21 PST
Mark Lam
Comment 3 2019-11-19 16:04:01 PST
Comment on attachment 383915 [details] Patch r=me
Mark Lam
Comment 4 2019-11-19 16:05:41 PST
Comment on attachment 383915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383915&action=review > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:425 > - g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); > + auto* allocator = new FixedVMPoolExecutableAllocator(); > + g_jscConfig.fixedVMPoolExecutableAllocator = allocator; > + globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = allocator; You could just implement this as: g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = g_jscConfig.fixedVMPoolExecutableAllocator; That way, there's only a 1 line change that is easier to undo later. > Source/JavaScriptCore/jit/ExecutableAllocator.cpp:657 > - g_jscConfig.executableAllocator = new ExecutableAllocator; > + auto* allocator = new ExecutableAllocator; > + g_jscConfig.executableAllocator = allocator; > + globalExecutableAllocatorToWorkAroundLeaks = allocator; Ditto.
Yusuke Suzuki
Comment 5 2019-11-19 16:55:57 PST
Comment on attachment 383915 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=383915&action=review >> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:425 >> + globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = allocator; > > You could just implement this as: > g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); > globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = g_jscConfig.fixedVMPoolExecutableAllocator; > > That way, there's only a 1 line change that is easier to undo later. Nice, fixed. >> Source/JavaScriptCore/jit/ExecutableAllocator.cpp:657 >> + globalExecutableAllocatorToWorkAroundLeaks = allocator; > > Ditto. Fixed.
Yusuke Suzuki
Comment 6 2019-11-19 16:56:55 PST
Note You need to log in before you can comment on or make changes to this bug.