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

Commit bc631759 authored by Christopher Ferris's avatar Christopher Ferris Committed by Gerrit Code Review
Browse files

Merge "Add CHECK to verify assumptions in the code."

parents 15ae358c 2b98c82f
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);