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

Commit bb770d06 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

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

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


#include <android-base/file.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.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) {
  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_probable_cause(log, unwinder, process_info, thread_info);


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


#include <android-base/file.h>
#include <android-base/file.h>
#include <android-base/logging.h>
#include <android-base/properties.h>
#include <android-base/properties.h>
#include <android-base/stringprintf.h>
#include <android-base/stringprintf.h>
#include <android-base/strings.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_tid(main_thread.tid);
  result.set_uid(main_thread.uid);
  result.set_uid(main_thread.uid);
  result.set_selinux_label(main_thread.selinux_label);
  result.set_selinux_label(main_thread.selinux_label);
  // The main thread must have a valid siginfo.
  CHECK(main_thread.siginfo != nullptr);


  struct sysinfo si;
  struct sysinfo si;
  sysinfo(&si);
  sysinfo(&si);