diff options
author | 2014-12-02 03:10:22 +0000 | |
---|---|---|
committer | 2014-12-02 03:10:22 +0000 | |
commit | f7ebda43cb185b6414a2e86eef95eaf10b74db2c (patch) | |
tree | 904c51e03d06ec37268bba0ce29fd73f073b9b03 /runtime/fault_handler.cc | |
parent | ea09c1ed912bd5cc87aada58f3f24825940fb148 (diff) | |
parent | 5e2b8747df8eabdd0daf091f1afe3b7b3d6c2719 (diff) |
Merge "Fix fault handler invoked before vm running."
Diffstat (limited to 'runtime/fault_handler.cc')
-rw-r--r-- | runtime/fault_handler.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc index 835485c351..94753d4461 100644 --- a/runtime/fault_handler.cc +++ b/runtime/fault_handler.cc @@ -177,6 +177,12 @@ void FaultManager::HandleFault(int sig, siginfo_t* info, void* context) { Thread* self = Thread::Current(); + // If ART is not running, or the thread is not attached to ART pass the + // signal on to the next handler in the chain. + if (self == nullptr || Runtime::Current() == nullptr || !Runtime::Current()->IsStarted()) { + InvokeUserSignalHandler(sig, info, context); + return; + } // Now set up the nested signal handler. // TODO: add SIGSEGV back to the nested signals when we can handle running out stack gracefully. |