Changeset 250406 in webkit
- Timestamp:
- Sep 26, 2019, 6:54:08 PM (6 years ago)
- Location:
- tags/Safari-609.1.5/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-609.1.5/Source/JavaScriptCore/ChangeLog
r250328 r250406 1 2019-09-26 Kocsen Chung <kocsen_chung@apple.com> 2 3 Cherry-pick r250383. rdar://problem/55673084 4 5 We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT. 6 https://bugs.webkit.org/show_bug.cgi?id=202257 7 8 Reviewed by Saam Barati. 9 10 Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks 11 that region is reserved, and as such, can cause Gigacage allocation to fail. We 12 work around this by initializing the Gigacage first. 13 14 Note: when called, setJITEnabled() is always called extra early in the process 15 bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we 16 will naturally initialize the Gigacage before we allocate the JIT region. 17 Hence, this workaround is merely ensuring the same behavior of allocation ordering. 18 19 This patch only applies to iOS. 20 21 * jit/ExecutableAllocator.cpp: 22 (JSC::ExecutableAllocator::setJITEnabled): 23 24 25 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250383 268f45cc-cd09-0410-ab3c-d52691b4dbfc 26 27 2019-09-26 Mark Lam <mark.lam@apple.com> 28 29 We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT. 30 https://bugs.webkit.org/show_bug.cgi?id=202257 31 32 Reviewed by Saam Barati. 33 34 Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks 35 that region is reserved, and as such, can cause Gigacage allocation to fail. We 36 work around this by initializing the Gigacage first. 37 38 Note: when called, setJITEnabled() is always called extra early in the process 39 bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we 40 will naturally initialize the Gigacage before we allocate the JIT region. 41 Hence, this workaround is merely ensuring the same behavior of allocation ordering. 42 43 This patch only applies to iOS. 44 45 * jit/ExecutableAllocator.cpp: 46 (JSC::ExecutableAllocator::setJITEnabled): 47 1 48 2019-09-24 Christopher Reid <chris.reid@sony.com> 2 49 -
tags/Safari-609.1.5/Source/JavaScriptCore/jit/ExecutableAllocator.cpp
r249808 r250406 131 131 #if PLATFORM(IOS_FAMILY) && (CPU(ARM64) || CPU(ARM)) 132 132 if (!enabled) { 133 // Because of an OS quirk, even after the JIT region has been unmapped, 134 // the OS thinks that region is reserved, and as such, can cause Gigacage 135 // allocation to fail. We work around this by initializing the Gigacage 136 // first. 137 // Note: when called, setJITEnabled() is always called extra early in the 138 // process bootstrap. Under normal operation (when setJITEnabled() isn't 139 // called at all), we will naturally initialize the Gigacage before we 140 // allocate the JIT region. Hence, this workaround is merely ensuring the 141 // same behavior of allocation ordering. 142 Gigacage::ensureGigacage(); 143 133 144 constexpr size_t size = 1; 134 145 constexpr int protection = PROT_READ | PROT_WRITE | PROT_EXEC;
Note:
See TracChangeset
for help on using the changeset viewer.