summaryrefslogtreecommitdiffstats
path: root/runtime/runtime_android.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-03-03 16:11:42 -0800
committerMathieu Chartier <mathieuc@google.com>2014-03-03 16:40:42 -0800
commitc2f4d0240b3a9b905dff5b546924865f15241481 (patch)
tree133e39fac183d8ea0818f93b8e5e88f4221b9555 /runtime/runtime_android.cc
parent6b8c503c6df887ff30f478ab58bdfdb223492f45 (diff)
downloadart-c2f4d0240b3a9b905dff5b546924865f15241481.tar.gz
art-c2f4d0240b3a9b905dff5b546924865f15241481.tar.bz2
art-c2f4d0240b3a9b905dff5b546924865f15241481.zip
Fix SafePrettyTypeOf to never call VerifyObject.
Calling VerifyObject from the segfault handler caused another segfault. Change-Id: I459646594d830cbb110a4ac2bac25a7b90794854
Diffstat (limited to 'runtime/runtime_android.cc')
-rw-r--r--runtime/runtime_android.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/runtime_android.cc b/runtime/runtime_android.cc
index 14e557450b..a2377229da 100644
--- a/runtime/runtime_android.cc
+++ b/runtime/runtime_android.cc
@@ -27,6 +27,8 @@
namespace art {
+static constexpr bool kDumpHeapObjectOnSigsevg = false;
+
struct sigaction old_action;
void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_context) {
static bool handlingUnexpectedSignal = false;
@@ -44,7 +46,7 @@ void HandleUnexpectedSignal(int signal_number, siginfo_t* info, void* raw_contex
// Print this out first in case DumpObject faults.
LOG(INTERNAL_FATAL) << "Fault message: " << runtime->GetFaultMessage();
gc::Heap* heap = runtime->GetHeap();
- if (heap != nullptr && info != nullptr) {
+ if (kDumpHeapObjectOnSigsevg && heap != nullptr && info != nullptr) {
LOG(INTERNAL_FATAL) << "Dump heap object at fault address: ";
heap->DumpObject(LOG(INTERNAL_FATAL), reinterpret_cast<mirror::Object*>(info->si_addr));
}