ART: Avoid a recursive abort
When waiting for checkpoints on abort, don't abort on timeout.
Change-Id: Ic87c25d466021d391563f870642251b69dd62af5
diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc
index 5ff90d6..beafcda 100644
--- a/runtime/thread_list.cc
+++ b/runtime/thread_list.cc
@@ -168,7 +168,9 @@
const uint32_t kWaitTimeoutMs = 10000;
bool timed_out = barrier_.Increment(self, threads_running_checkpoint, kWaitTimeoutMs);
if (timed_out) {
- LOG(kIsDebugBuild ? FATAL : ERROR) << "Unexpected time out during dump checkpoint.";
+ // Avoid a recursive abort.
+ LOG((kIsDebugBuild && (gAborting == 0)) ? FATAL : ERROR)
+ << "Unexpected time out during dump checkpoint.";
}
}