OSDN Git Service

ART: Fast-fail empty other handlers in fault handling
authorAndreas Gampe <agampe@google.com>
Tue, 19 Apr 2016 00:15:42 +0000 (17:15 -0700)
committerAndreas Gampe <agampe@google.com>
Tue, 19 Apr 2016 00:15:42 +0000 (17:15 -0700)
Don't try to set up the nested handler environment if there are
no other handlers installed.

Stop-gap for the current setup without other handlers. There are
a myriad more issues before we can safely re-enable other handlers.

Bug: 28245957
Change-Id: I526aef82aa1ca2b6c4b1959858fe76231bc067d9

runtime/fault_handler.cc

index 5c5abeb..9f073a6 100644 (file)
@@ -147,6 +147,10 @@ void FaultManager::Shutdown() {
 }
 
 bool FaultManager::HandleFaultByOtherHandlers(int sig, siginfo_t* info, void* context) {
+  if (other_handlers_.empty()) {
+    return false;
+  }
+
   Thread* self = Thread::Current();
 
   DCHECK(self != nullptr);