Bug 1332312 - remove JS_DISABLE_SLOW_SCRIPT_SIGNALS (r=bbouvier)
authorLuke Wagner <luke@mozilla.com>
Thu, 19 Jan 2017 14:06:24 -0600
changeset 375225 dc6a325145178d50841fc11a2ac86cd4d87ed8bc
parent 375160 bde3fc40b9b55435d989393d659a60f46b54fd72
child 375226 d00ea9cc0fc5590bd111a624ab75ea767645dcd2
push id6996
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 20:48:21 +0000
treeherdermozilla-beta@d89512dab048 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbbouvier
bugs1332312
milestone53.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1332312 - remove JS_DISABLE_SLOW_SCRIPT_SIGNALS (r=bbouvier) MozReview-Commit-ID: 6uyBGnbAimG
js/src/wasm/WasmSignalHandlers.cpp
python/mozbuild/mozbuild/mach_commands.py
testing/mochitest/mochitest_options.py
testing/mochitest/runtests.py
--- a/js/src/wasm/WasmSignalHandlers.cpp
+++ b/js/src/wasm/WasmSignalHandlers.cpp
@@ -1297,21 +1297,16 @@ static bool sHaveSignalHandlers = false;
 static bool
 ProcessHasSignalHandlers()
 {
     // We assume that there are no races creating the first JSRuntime of the process.
     if (sTriedInstallSignalHandlers)
         return sHaveSignalHandlers;
     sTriedInstallSignalHandlers = true;
 
-    // Developers might want to forcibly disable signals to avoid seeing
-    // spurious SIGSEGVs in the debugger.
-    if (getenv("JS_DISABLE_SLOW_SCRIPT_SIGNALS") || getenv("JS_NO_SIGNALS"))
-        return false;
-
 #if defined(ANDROID)
     // Before Android 4.4 (SDK version 19), there is a bug
     //   https://android-review.googlesource.com/#/c/52333
     // in Bionic's pthread_join which causes pthread_join to return early when
     // pthread_kill is used (on any thread). Nobody expects the pthread_cond_wait
     // EINTRquisition.
     char version_string[PROP_VALUE_MAX];
     PodArrayZero(version_string);
--- a/python/mozbuild/mozbuild/mach_commands.py
+++ b/python/mozbuild/mozbuild/mach_commands.py
@@ -1117,35 +1117,28 @@ class RunProgram(MachCommandBase):
     @CommandArgumentGroup('debugging')
     @CommandArgument('--debug', action='store_true', group='debugging',
         help='Enable the debugger. Not specifying a --debugger option will result in the default debugger being used.')
     @CommandArgument('--debugger', default=None, type=str, group='debugging',
         help='Name of debugger to use.')
     @CommandArgument('--debugparams', default=None, metavar='params', type=str,
         group='debugging',
         help='Command-line arguments to pass to the debugger itself; split as the Bourne shell would.')
-    # Bug 933807 introduced JS_DISABLE_SLOW_SCRIPT_SIGNALS to avoid clever
-    # segfaults induced by the slow-script-detecting logic for Ion/Odin JITted
-    # code.  If we don't pass this, the user will need to periodically type
-    # "continue" to (safely) resume execution.  There are ways to implement
-    # automatic resuming; see the bug.
-    @CommandArgument('--slowscript', action='store_true', group='debugging',
-        help='Do not set the JS_DISABLE_SLOW_SCRIPT_SIGNALS env variable; when not set, recoverable but misleading SIGSEGV instances may occur in Ion/Odin JIT code.')
 
     @CommandArgumentGroup('DMD')
     @CommandArgument('--dmd', action='store_true', group='DMD',
         help='Enable DMD. The following arguments have no effect without this.')
     @CommandArgument('--mode', choices=['live', 'dark-matter', 'cumulative', 'scan'], group='DMD',
          help='Profiling mode. The default is \'dark-matter\'.')
     @CommandArgument('--stacks', choices=['partial', 'full'], group='DMD',
         help='Allocation stack trace coverage. The default is \'partial\'.')
     @CommandArgument('--show-dump-stats', action='store_true', group='DMD',
         help='Show stats when doing dumps.')
     def run(self, params, remote, background, noprofile, disable_e10s,
-        enable_crash_reporter, debug, debugger, debugparams, slowscript,
+        enable_crash_reporter, debug, debugger, debugparams,
         dmd, mode, stacks, show_dump_stats):
 
         if conditions.is_android(self):
             # Running Firefox for Android is completely different
             if dmd:
                 print("DMD is not supported for Firefox for Android")
                 return 1
             from mozrunner.devices.android_device import verify_android_device, run_firefox_for_android
@@ -1215,19 +1208,16 @@ class RunProgram(MachCommandBase):
                 from mozbuild import shellutil
                 try:
                     debugparams = shellutil.split(debugparams)
                 except shellutil.MetaCharacterException as e:
                     print("The --debugparams you passed require a real shell to parse them.")
                     print("(We can't handle the %r character.)" % e.char)
                     return 1
 
-            if not slowscript:
-                extra_env['JS_DISABLE_SLOW_SCRIPT_SIGNALS'] = '1'
-
             # Prepend the debugger args.
             args = [self.debuggerInfo.path] + self.debuggerInfo.args + args
 
         if dmd:
             dmd_params = []
 
             if mode:
                 dmd_params.append('--mode=' + mode)
--- a/testing/mochitest/mochitest_options.py
+++ b/testing/mochitest/mochitest_options.py
@@ -475,23 +475,16 @@ class MochitestArguments(ArgumentContain
           }],
         [["--dump-dmd-after-test"],
          {"action": "store_true",
           "default": False,
           "dest": "dumpDMDAfterTest",
           "help": "Dump a DMD log after each test in the directory specified "
                   "by --dump-output-directory.",
           }],
-        [["--slowscript"],
-         {"action": "store_true",
-          "default": False,
-          "help": "Do not set the JS_DISABLE_SLOW_SCRIPT_SIGNALS env variable; "
-                  "when not set, recoverable but misleading SIGSEGV instances "
-                  "may occur in Ion/Odin JIT code.",
-          }],
         [["--screenshot-on-fail"],
          {"action": "store_true",
           "default": False,
           "dest": "screenshotOnFail",
           "help": "Take screenshots on all test failures. Set $MOZ_UPLOAD_DIR to a directory "
                   "for storing the screenshots."
           }],
         [["--quiet"],
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -1523,19 +1523,16 @@ toolbar#nav-bar {
             browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort"
 
         # Produce a mozlog, if setup (see MOZ_LOG global at the top of
         # this script).
         self.mozLogs = MOZ_LOG and "MOZ_UPLOAD_DIR" in os.environ
         if self.mozLogs:
             browserEnv["MOZ_LOG"] = MOZ_LOG
 
-        if debugger and not options.slowscript:
-            browserEnv["JS_DISABLE_SLOW_SCRIPT_SIGNALS"] = "1"
-
         # For e10s, our tests default to suppressing the "unsafe CPOW usage"
         # warnings that can plague test logs.
         if not options.enableCPOWWarnings:
             browserEnv["DISABLE_UNSAFE_CPOW_WARNINGS"] = "1"
 
         return browserEnv
 
     def killNamedOrphans(self, pname):