From 50ae6481cf814d6e5d4c0aee1928b9c437d67044 Mon Sep 17 00:00:00 2001 From: Aaron Klotz Date: Mon, 16 Dec 2019 20:15:01 +0000 Subject: [PATCH] Bug 1603250: Do not set ah_crap_handler signal handler in debug x86 Android builds; r=snorp Differential Revision: https://phabricator.services.mozilla.com/D56852 --HG-- extra : moz-landing-system : lando --- .../mozilla/geckoview/test/ContentDelegateTest.kt | 12 ------------ .../geckoview/test/GeckoSessionTestRuleTest.kt | 8 -------- .../org/mozilla/geckoview/test/crash/CrashTest.kt | 2 -- toolkit/xre/nsSigHandlers.cpp | 2 +- 4 files changed, 1 insertion(+), 23 deletions(-) diff --git a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt index dca996483059..f2f6e958190e 100644 --- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt +++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/ContentDelegateTest.kt @@ -88,10 +88,6 @@ class ContentDelegateTest : BaseSessionTest() { @Test fun crashContent() { // This test doesn't make sense without multiprocess assumeThat(sessionRule.env.isMultiprocess, equalTo(true)) - // Cannot test x86 debug builds due to Gecko's "ah_crap_handler" - // that waits for debugger to attach during a SIGSEGV. - assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.isX86, - equalTo(false)) mainSession.loadUri(CONTENT_CRASH_URL) mainSession.waitUntilCalled(object : Callbacks.ContentDelegate { @@ -118,10 +114,6 @@ class ContentDelegateTest : BaseSessionTest() { @Test fun crashContent_tapAfterCrash() { // This test doesn't make sense without multiprocess assumeThat(sessionRule.env.isMultiprocess, equalTo(true)) - // Cannot test x86 debug builds due to Gecko's "ah_crap_handler" - // that waits for debugger to attach during a SIGSEGV. - assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.isX86, - equalTo(false)) mainSession.delegateUntilTestEnd(object : Callbacks.ContentDelegate { override fun onCrash(session: GeckoSession) { @@ -143,10 +135,6 @@ class ContentDelegateTest : BaseSessionTest() { @Test fun crashContentMultipleSessions() { // This test doesn't make sense without multiprocess assumeThat(sessionRule.env.isMultiprocess, equalTo(true)) - // Cannot test x86 debug builds due to Gecko's "ah_crap_handler" - // that waits for debugger to attach during a SIGSEGV. - assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.isX86, - equalTo(false)) // XXX we need to make sure all sessions in a given content process receive onCrash(). // If we add multiple content processes, this test will need to be fixed to ensure the diff --git a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/GeckoSessionTestRuleTest.kt b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/GeckoSessionTestRuleTest.kt index 6f8b745986e5..92fbbac1e598 100644 --- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/GeckoSessionTestRuleTest.kt +++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/GeckoSessionTestRuleTest.kt @@ -1638,10 +1638,6 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) { @IgnoreCrash @Test fun contentCrashIgnored() { assumeThat(sessionRule.env.isMultiprocess, equalTo(true)) - // Cannot test x86 debug builds due to Gecko's "ah_crap_handler" - // that waits for debugger to attach during a SIGSEGV. - assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.isX86, - equalTo(false)) mainSession.loadUri(CONTENT_CRASH_URL) mainSession.waitUntilCalled(object : Callbacks.ContentDelegate { @@ -1654,10 +1650,6 @@ class GeckoSessionTestRuleTest : BaseSessionTest(noErrorCollector = true) { fun contentCrashFails() { assumeThat(sessionRule.env.isMultiprocess, equalTo(true)) assumeThat(sessionRule.env.shouldShutdownOnCrash(), equalTo(false)) - // Cannot test x86 debug builds due to Gecko's "ah_crap_handler" - // that waits for debugger to attach during a SIGSEGV. - assumeThat(sessionRule.env.isDebugBuild && sessionRule.env.isX86, - equalTo(false)) sessionRule.session.loadUri(CONTENT_CRASH_URL) sessionRule.waitForPageStop() diff --git a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/crash/CrashTest.kt b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/crash/CrashTest.kt index 14cc40e39b6b..a0c89ccaf98d 100644 --- a/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/crash/CrashTest.kt +++ b/mobile/android/geckoview/src/androidTest/java/org/mozilla/geckoview/test/crash/CrashTest.kt @@ -55,8 +55,6 @@ class CrashTest { @Test fun crashParent() { - Assume.assumeFalse(env.isX86) // Too flaky on x86 - messenger.send(Message.obtain(null, RemoteGeckoService.CMD_CRASH_PARENT_NATIVE)) assertCrashIntent(CrashTestHandler.queue.take(), true) } diff --git a/toolkit/xre/nsSigHandlers.cpp b/toolkit/xre/nsSigHandlers.cpp index 3c05c79f8a70..da36c5c91d92 100644 --- a/toolkit/xre/nsSigHandlers.cpp +++ b/toolkit/xre/nsSigHandlers.cpp @@ -40,7 +40,7 @@ // Note: some tests manipulate this value. unsigned int _gdb_sleep_duration = 300; -# if defined(LINUX) && defined(DEBUG) && \ +# if defined(LINUX) && !defined(ANDROID) && defined(DEBUG) && \ (defined(__i386) || defined(__x86_64) || defined(PPC)) # define CRAWL_STACK_ON_SIGSEGV # endif