Title: [249612] trunk
Revision
249612
Author
mark....@apple.com
Date
2019-09-07 07:53:21 -0700 (Sat, 07 Sep 2019)

Log Message

The jsc shell should allow disabling of the Gigacage for testing purposes.
https://bugs.webkit.org/show_bug.cgi?id=201579

Reviewed by Michael Saboff.

JSTests:

Unskip the tests now.

* stress/disable-gigacage-arrays.js:
* stress/disable-gigacage-strings.js:
* stress/disable-gigacage-typed-arrays.js:

Source/_javascript_Core:

Check for the same GIGACAGE_ENABLED env var that is checked by Gigacage code.  If
this env var is present and it has a falsy value, then do not
forbidDisablingPrimitiveGigacage() in the jsc shell.

* jsc.cpp:
(jscmain):

Modified Paths

Diff

Modified: trunk/JSTests/ChangeLog (249611 => 249612)


--- trunk/JSTests/ChangeLog	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/JSTests/ChangeLog	2019-09-07 14:53:21 UTC (rev 249612)
@@ -1,5 +1,18 @@
 2019-09-07  Mark Lam  <mark....@apple.com>
 
+        The jsc shell should allow disabling of the Gigacage for testing purposes.
+        https://bugs.webkit.org/show_bug.cgi?id=201579
+
+        Reviewed by Michael Saboff.
+
+        Unskip the tests now.
+
+        * stress/disable-gigacage-arrays.js:
+        * stress/disable-gigacage-strings.js:
+        * stress/disable-gigacage-typed-arrays.js:
+
+2019-09-07  Mark Lam  <mark....@apple.com>
+
         Gardening: temporarily skipping these tests until the fix can be reviewed and landed.
 
         Not reviewed.

Modified: trunk/JSTests/stress/disable-gigacage-arrays.js (249611 => 249612)


--- trunk/JSTests/stress/disable-gigacage-arrays.js	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/JSTests/stress/disable-gigacage-arrays.js	2019-09-07 14:53:21 UTC (rev 249612)
@@ -1,5 +1,4 @@
-//@ skip
-// temporarily disable, previous options: runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
+//@ runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
 
 (function() {
     function foo(array, i)

Modified: trunk/JSTests/stress/disable-gigacage-strings.js (249611 => 249612)


--- trunk/JSTests/stress/disable-gigacage-strings.js	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/JSTests/stress/disable-gigacage-strings.js	2019-09-07 14:53:21 UTC (rev 249612)
@@ -1,5 +1,4 @@
-//@ skip
-// temporarily disable, previous options: runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
+//@ runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
 
 (function() {
     function foo(array, i)

Modified: trunk/JSTests/stress/disable-gigacage-typed-arrays.js (249611 => 249612)


--- trunk/JSTests/stress/disable-gigacage-typed-arrays.js	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/JSTests/stress/disable-gigacage-typed-arrays.js	2019-09-07 14:53:21 UTC (rev 249612)
@@ -1,5 +1,4 @@
-//@ skip
-// temporarily disable, previous options: runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
+//@ runNoisyTestWithEnv "disable-gigacage", "GIGACAGE_ENABLED=0"
 
 (function() {
     function foo(array, i)

Modified: trunk/Source/_javascript_Core/ChangeLog (249611 => 249612)


--- trunk/Source/_javascript_Core/ChangeLog	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/Source/_javascript_Core/ChangeLog	2019-09-07 14:53:21 UTC (rev 249612)
@@ -1,3 +1,17 @@
+2019-09-07  Mark Lam  <mark....@apple.com>
+
+        The jsc shell should allow disabling of the Gigacage for testing purposes.
+        https://bugs.webkit.org/show_bug.cgi?id=201579
+
+        Reviewed by Michael Saboff.
+
+        Check for the same GIGACAGE_ENABLED env var that is checked by Gigacage code.  If
+        this env var is present and it has a falsy value, then do not
+        forbidDisablingPrimitiveGigacage() in the jsc shell.
+
+        * jsc.cpp:
+        (jscmain):
+
 2019-09-06  Mark Lam  <mark....@apple.com>
 
         Harden protection of the Gigacage Config parameters.

Modified: trunk/Source/_javascript_Core/jsc.cpp (249611 => 249612)


--- trunk/Source/_javascript_Core/jsc.cpp	2019-09-07 10:13:34 UTC (rev 249611)
+++ trunk/Source/_javascript_Core/jsc.cpp	2019-09-07 14:53:21 UTC (rev 249612)
@@ -3086,8 +3086,17 @@
 #if ENABLE(WEBASSEMBLY)
     JSC::Wasm::enableFastMemory();
 #endif
-    Gigacage::forbidDisablingPrimitiveGigacage();
 
+    bool gigacageDisableRequested = false;
+#if GIGACAGE_ENABLED && !COMPILER(MSVC)
+    if (char* gigacageEnabled = getenv("GIGACAGE_ENABLED")) {
+        if (!strcasecmp(gigacageEnabled, "no") || !strcasecmp(gigacageEnabled, "false") || !strcasecmp(gigacageEnabled, "0"))
+            gigacageDisableRequested = true;
+    }
+#endif
+    if (!gigacageDisableRequested)
+        Gigacage::forbidDisablingPrimitiveGigacage();
+
 #if PLATFORM(COCOA)
     auto& memoryPressureHandler = MemoryPressureHandler::singleton();
     {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to