diff options
author | Andreas Gampe <agampe@google.com> | 2014-08-16 13:41:10 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2014-08-18 09:40:40 -0700 |
commit | 956a5228276693a7317ae6b41bfe7a7f0f3cbe6b (patch) | |
tree | 4fb359d422d2d7af04f1b9dc9b8b5d6f268b138b /runtime/monitor.h | |
parent | 078f4ea927b3259d698ca3dd542a096943e2cccd (diff) | |
download | art-956a5228276693a7317ae6b41bfe7a7f0f3cbe6b.zip art-956a5228276693a7317ae6b41bfe7a7f0f3cbe6b.tar.gz art-956a5228276693a7317ae6b41bfe7a7f0f3cbe6b.tar.bz2 |
ART: Do not recursively abort when visiting locks in a bad state
This avoids a nested abort in VisitLocks.
Bug: 17080621, 16382675
(cherry picked from commit 760172c3ccd6e75f6f1a89d8006934e8ffb1303e)
Change-Id: Id604976ac9dcac0e319fb25cab4d2cbc98d7ee24
Diffstat (limited to 'runtime/monitor.h')
-rw-r--r-- | runtime/monitor.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/monitor.h b/runtime/monitor.h index 26d43c9..e8321eb 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -88,8 +88,10 @@ class Monitor { // Calls 'callback' once for each lock held in the single stack frame represented by // the current state of 'stack_visitor'. + // The abort_on_failure flag allows to not die when the state of the runtime is unorderly. This + // is necessary when we have already aborted but want to dump the stack as much as we can. static void VisitLocks(StackVisitor* stack_visitor, void (*callback)(mirror::Object*, void*), - void* callback_context) + void* callback_context, bool abort_on_failure = true) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static bool IsValidLockWord(LockWord lock_word); |