diff options
Diffstat (limited to 'runtime/runtime.cc')
-rw-r--r-- | runtime/runtime.cc | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/runtime/runtime.cc b/runtime/runtime.cc index 84ec7ef710..8c0150e6a7 100644 --- a/runtime/runtime.cc +++ b/runtime/runtime.cc @@ -1768,34 +1768,36 @@ bool Runtime::Init(RuntimeArgumentMap&& runtime_options_in) { break; } - if (HandlesSignalsInCompiledCode()) { + if (!no_sig_chain_) { fault_manager.Init(); - // These need to be in a specific order. The null point check handler must be - // after the suspend check and stack overflow check handlers. - // - // Note: the instances attach themselves to the fault manager and are handled by it. The - // manager will delete the instance on Shutdown(). - if (implicit_suspend_checks_) { - new SuspensionHandler(&fault_manager); - } + if (HandlesSignalsInCompiledCode()) { + // These need to be in a specific order. The null point check handler must be + // after the suspend check and stack overflow check handlers. + // + // Note: the instances attach themselves to the fault manager and are handled by it. The + // manager will delete the instance on Shutdown(). + if (implicit_suspend_checks_) { + new SuspensionHandler(&fault_manager); + } - if (implicit_so_checks_) { - new StackOverflowHandler(&fault_manager); - } + if (implicit_so_checks_) { + new StackOverflowHandler(&fault_manager); + } - if (implicit_null_checks_) { - new NullPointerHandler(&fault_manager); - } + if (implicit_null_checks_) { + new NullPointerHandler(&fault_manager); + } - if (kEnableJavaStackTraceHandler) { - new JavaStackTraceHandler(&fault_manager); - } + if (kEnableJavaStackTraceHandler) { + new JavaStackTraceHandler(&fault_manager); + } - if (interpreter::CanRuntimeUseNterp()) { - // Nterp code can use signal handling just like the compiled managed code. - OatQuickMethodHeader* nterp_header = OatQuickMethodHeader::NterpMethodHeader; - fault_manager.AddGeneratedCodeRange(nterp_header->GetCode(), nterp_header->GetCodeSize()); + if (interpreter::CanRuntimeUseNterp()) { + // Nterp code can use signal handling just like the compiled managed code. + OatQuickMethodHeader* nterp_header = OatQuickMethodHeader::NterpMethodHeader; + fault_manager.AddGeneratedCodeRange(nterp_header->GetCode(), nterp_header->GetCodeSize()); + } } } |