Title: [250406] tags/Safari-609.1.5/Source/_javascript_Core
- Revision
- 250406
- Author
- [email protected]
- Date
- 2019-09-26 18:54:08 -0700 (Thu, 26 Sep 2019)
Log Message
Cherry-pick r250383. rdar://problem/55673084
We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT.
https://bugs.webkit.org/show_bug.cgi?id=202257
Reviewed by Saam Barati.
Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks
that region is reserved, and as such, can cause Gigacage allocation to fail. We
work around this by initializing the Gigacage first.
Note: when called, setJITEnabled() is always called extra early in the process
bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we
will naturally initialize the Gigacage before we allocate the JIT region.
Hence, this workaround is merely ensuring the same behavior of allocation ordering.
This patch only applies to iOS.
* jit/ExecutableAllocator.cpp:
(JSC::ExecutableAllocator::setJITEnabled):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: tags/Safari-609.1.5/Source/_javascript_Core/ChangeLog (250405 => 250406)
--- tags/Safari-609.1.5/Source/_javascript_Core/ChangeLog 2019-09-27 00:59:37 UTC (rev 250405)
+++ tags/Safari-609.1.5/Source/_javascript_Core/ChangeLog 2019-09-27 01:54:08 UTC (rev 250406)
@@ -1,3 +1,50 @@
+2019-09-26 Kocsen Chung <[email protected]>
+
+ Cherry-pick r250383. rdar://problem/55673084
+
+ We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT.
+ https://bugs.webkit.org/show_bug.cgi?id=202257
+
+ Reviewed by Saam Barati.
+
+ Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks
+ that region is reserved, and as such, can cause Gigacage allocation to fail. We
+ work around this by initializing the Gigacage first.
+
+ Note: when called, setJITEnabled() is always called extra early in the process
+ bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we
+ will naturally initialize the Gigacage before we allocate the JIT region.
+ Hence, this workaround is merely ensuring the same behavior of allocation ordering.
+
+ This patch only applies to iOS.
+
+ * jit/ExecutableAllocator.cpp:
+ (JSC::ExecutableAllocator::setJITEnabled):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250383 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-09-26 Mark Lam <[email protected]>
+
+ We need to initialize the Gigacage first in setJITEnabled() when disabling the JIT.
+ https://bugs.webkit.org/show_bug.cgi?id=202257
+
+ Reviewed by Saam Barati.
+
+ Because of an OS quirk, even after the JIT region has been unmapped, the OS thinks
+ that region is reserved, and as such, can cause Gigacage allocation to fail. We
+ work around this by initializing the Gigacage first.
+
+ Note: when called, setJITEnabled() is always called extra early in the process
+ bootstrap. Under normal operation (when setJITEnabled() isn't called at all), we
+ will naturally initialize the Gigacage before we allocate the JIT region.
+ Hence, this workaround is merely ensuring the same behavior of allocation ordering.
+
+ This patch only applies to iOS.
+
+ * jit/ExecutableAllocator.cpp:
+ (JSC::ExecutableAllocator::setJITEnabled):
+
2019-09-24 Christopher Reid <[email protected]>
[WinCairo] Start RemoteInspectorServer
Modified: tags/Safari-609.1.5/Source/_javascript_Core/jit/ExecutableAllocator.cpp (250405 => 250406)
--- tags/Safari-609.1.5/Source/_javascript_Core/jit/ExecutableAllocator.cpp 2019-09-27 00:59:37 UTC (rev 250405)
+++ tags/Safari-609.1.5/Source/_javascript_Core/jit/ExecutableAllocator.cpp 2019-09-27 01:54:08 UTC (rev 250406)
@@ -130,6 +130,17 @@
#if PLATFORM(IOS_FAMILY) && (CPU(ARM64) || CPU(ARM))
if (!enabled) {
+ // Because of an OS quirk, even after the JIT region has been unmapped,
+ // the OS thinks that region is reserved, and as such, can cause Gigacage
+ // allocation to fail. We work around this by initializing the Gigacage
+ // first.
+ // Note: when called, setJITEnabled() is always called extra early in the
+ // process bootstrap. Under normal operation (when setJITEnabled() isn't
+ // called at all), we will naturally initialize the Gigacage before we
+ // allocate the JIT region. Hence, this workaround is merely ensuring the
+ // same behavior of allocation ordering.
+ Gigacage::ensureGigacage();
+
constexpr size_t size = 1;
constexpr int protection = PROT_READ | PROT_WRITE | PROT_EXEC;
constexpr int flags = MAP_PRIVATE | MAP_ANON | MAP_JIT;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes