Changeset 252661 in webkit
- Timestamp:
- Nov 19, 2019 4:56:39 PM (5 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r252618 r252661 1 2019-11-19 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Work-around Leaks' false-positive report about memory leaking 4 https://bugs.webkit.org/show_bug.cgi?id=204384 5 <rdar://problem/56950932> 6 7 Reviewed by Mark Lam. 8 9 According to the radar, Leaks start reporting false-positive memory leaks about ExecutableAllocator and FixedVMPoolExecutableAllocator, 10 while they are per-process singleton and reachable through g_jscConfig. I'm guessing this is because Leaks start skipping scan for 11 readonly memory region. (g_jscConfig is now mprotected to readonly). 12 13 To work-around this, we anchor these heap allocated things to global variables to help Leaks scan. Once it is fixed, we should remove it. 14 15 * jit/ExecutableAllocator.cpp: 16 (JSC::ExecutableAllocator::initializeUnderlyingAllocator): 17 (JSC::ExecutableAllocator::initialize): 18 1 19 2019-11-18 Mark Lam <mark.lam@apple.com> 2 20 -
trunk/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r250383 r252661 415 415 } 416 416 417 // Keep this pointer in a mutable global variable to help Leaks find it. 418 // But we do not use this pointer. 419 static FixedVMPoolExecutableAllocator* globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = nullptr; 417 420 void ExecutableAllocator::initializeUnderlyingAllocator() 418 421 { 419 422 RELEASE_ASSERT(!g_jscConfig.fixedVMPoolExecutableAllocator); 420 423 g_jscConfig.fixedVMPoolExecutableAllocator = new FixedVMPoolExecutableAllocator(); 424 globalFixedVMPoolExecutableAllocatorToWorkAroundLeaks = g_jscConfig.fixedVMPoolExecutableAllocator; 421 425 CodeProfiling::notifyAllocator(g_jscConfig.fixedVMPoolExecutableAllocator); 422 426 } … … 643 647 namespace JSC { 644 648 649 // Keep this pointer in a mutable global variable to help Leaks find it. 650 // But we do not use this pointer. 651 static ExecutableAllocator* globalExecutableAllocatorToWorkAroundLeaks = nullptr; 645 652 void ExecutableAllocator::initialize() 646 653 { 647 654 g_jscConfig.executableAllocator = new ExecutableAllocator; 655 globalExecutableAllocatorToWorkAroundLeaks = g_jscConfig.executableAllocator; 648 656 } 649 657
Note: See TracChangeset
for help on using the changeset viewer.