diff options
author | 2018-04-03 15:55:46 -0700 | |
---|---|---|
committer | 2018-04-03 15:55:46 -0700 | |
commit | 9cc68edcbd7c19505c33ea9053e9d499ed11ce02 (patch) | |
tree | 636be0426a0794524ec8227748d7e3b9a0338369 /runtime/fault_handler.cc | |
parent | d1ede32d56d2b6c95f94a8c67d8b9f309940d9de (diff) |
Ensure that art_sigsegv_fault is never inlined
We were incorrectly inlining the art_sigsegv_fault function into
FaultManager::HandleFault. This is a problem because we want native
debuggers to break on this function instead of stopping on SIGSEGV,
since we use those for various internal functions. By setting the
art_sigsegv_fault function to be NO_INLINE we should not have this
problem.
Test: Manual inspection of libart.so
Bug: 77528455
Change-Id: I77753cf79966011d7bfbea056bb4efc3f55d64df
Diffstat (limited to 'runtime/fault_handler.cc')
-rw-r--r-- | runtime/fault_handler.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/fault_handler.cc b/runtime/fault_handler.cc index 3015b10103..671079b128 100644 --- a/runtime/fault_handler.cc +++ b/runtime/fault_handler.cc @@ -37,7 +37,9 @@ namespace art { // Static fault manger object accessed by signal handler. FaultManager fault_manager; -extern "C" __attribute__((visibility("default"))) void art_sigsegv_fault() { +// This needs to be NO_INLINE since some debuggers do not read the inline-info to set a breakpoint +// if it isn't. +extern "C" NO_INLINE __attribute__((visibility("default"))) void art_sigsegv_fault() { // Set a breakpoint here to be informed when a SIGSEGV is unhandled by ART. VLOG(signals)<< "Caught unknown SIGSEGV in ART fault handler - chaining to next handler."; } |