diff options
| -rw-r--r-- | runtime/barrier.cc | 2 | ||||
| -rw-r--r-- | runtime/barrier.h | 2 | ||||
| -rw-r--r-- | runtime/thread_list.cc | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/runtime/barrier.cc b/runtime/barrier.cc index f0fa66abfd..d144591daf 100644 --- a/runtime/barrier.cc +++ b/runtime/barrier.cc @@ -107,7 +107,7 @@ Barrier::~Barrier() { if (count_ != 0) { // Only check when not aborting and if we verify the count on shutdown. LOG((gAborting == 0 && verify_count_on_shutdown_) ? FATAL : WARNING) - << "Attempted to destroy barrier with non zero count" << count_; + << "Attempted to destroy barrier with non zero count " << count_; } } diff --git a/runtime/barrier.h b/runtime/barrier.h index 704ecb0f11..ad8f66f254 100644 --- a/runtime/barrier.h +++ b/runtime/barrier.h @@ -45,7 +45,7 @@ class Barrier { }; // If verify_count_on_shutdown is true, the destructor verifies that the count is zero in the - // destructor. This means that all expected threads have went through the barrier. + // destructor. This means that all expected threads went through the barrier. explicit Barrier(int count, bool verify_count_on_shutdown = true); virtual ~Barrier(); diff --git a/runtime/thread_list.cc b/runtime/thread_list.cc index f07dca12c2..ed6b2c91e5 100644 --- a/runtime/thread_list.cc +++ b/runtime/thread_list.cc @@ -203,6 +203,8 @@ class DumpCheckpoint final : public Closure { public: DumpCheckpoint(std::ostream* os, bool dump_native_stack) : os_(os), + // Avoid verifying count in case a thread doesn't end up passing through the barrier. + // This avoids a SIGABRT that would otherwise happen in the destructor. barrier_(0, /*verify_count_on_shutdown=*/false), backtrace_map_(dump_native_stack ? BacktraceMap::Create(getpid()) : nullptr), dump_native_stack_(dump_native_stack) { |