Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c5bc64f authored by Christopher Ferris's avatar Christopher Ferris Committed by Automerger Merge Worker
Browse files

Merge "Add CHECK to verify assumptions in the code." am: bc631759 am: bb770d06

Original change: https://android-review.googlesource.com/c/platform/system/core/+/1839573

Change-Id: I13e3f0cb648a8aab2bbd8802b14cfeaaccd041ca
parents e4f89a0f bb770d06
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@
#include <string>

#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
@@ -417,6 +418,8 @@ static bool dump_thread(log_t* log, unwindstack::Unwinder* unwinder, const Threa
  }

  if (primary_thread) {
    // The main thread must have a valid siginfo.
    CHECK(thread_info.siginfo != nullptr);
    dump_probable_cause(log, unwinder, process_info, thread_info);

    dump_abort_message(log, unwinder->GetProcessMemory().get(), process_info.abort_msg_address);
+3 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#include <async_safe/log.h>

#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.h>
@@ -616,6 +617,8 @@ void engrave_tombstone_proto(Tombstone* tombstone, unwindstack::Unwinder* unwind
  result.set_tid(main_thread.tid);
  result.set_uid(main_thread.uid);
  result.set_selinux_label(main_thread.selinux_label);
  // The main thread must have a valid siginfo.
  CHECK(main_thread.siginfo != nullptr);

  struct sysinfo si;
  sysinfo(&si);