diff options
author | David Srbecky <dsrbecky@google.com> | 2019-04-05 18:23:32 +0000 |
---|---|---|
committer | David Srbecky <dsrbecky@google.com> | 2019-04-12 12:55:50 +0000 |
commit | e5c4d62ba3fca09fed86ec605542b2be74a59851 (patch) | |
tree | da853107155df86b564454aad59b8ca9a5fcf598 /debuggerd | |
parent | 84ababefb7b7ec04027b741d7a6fe937cffee54b (diff) | |
download | system_core-e5c4d62ba3fca09fed86ec605542b2be74a59851.tar.gz system_core-e5c4d62ba3fca09fed86ec605542b2be74a59851.tar.bz2 system_core-e5c4d62ba3fca09fed86ec605542b2be74a59851.zip |
Revert "Check for data races when reading JIT/DEX entries."
This reverts commit 85b5fecec920208ec43b42488f08d4c2e5aaeda2.
Reason for revert: Breaks ART tests, reverting to investigate.
Exempt-From-Owner-Approval: Revert.
(cherry picked from commit b9cc4fbb268652744c812415cb2e5d1fbe04879a)
Bug: 130406806
Change-Id: I634e37060b97484d627fc544e3b406fd90aaa784
Diffstat (limited to 'debuggerd')
-rw-r--r-- | debuggerd/crash_dump.cpp | 3 | ||||
-rw-r--r-- | debuggerd/handler/debuggerd_fallback.cpp | 7 | ||||
-rw-r--r-- | debuggerd/libdebuggerd/tombstone.cpp | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/debuggerd/crash_dump.cpp b/debuggerd/crash_dump.cpp index 437450c05..82ba0a18e 100644 --- a/debuggerd/crash_dump.cpp +++ b/debuggerd/crash_dump.cpp @@ -48,6 +48,7 @@ #define ATRACE_TAG ATRACE_TAG_BIONIC #include <utils/Trace.h> +#include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> @@ -566,7 +567,7 @@ int main(int argc, char** argv) { // TODO: Use seccomp to lock ourselves down. unwindstack::UnwinderFromPid unwinder(256, vm_pid); - if (!unwinder.Init()) { + if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } diff --git a/debuggerd/handler/debuggerd_fallback.cpp b/debuggerd/handler/debuggerd_fallback.cpp index 5f7ebc34c..bbec612a8 100644 --- a/debuggerd/handler/debuggerd_fallback.cpp +++ b/debuggerd/handler/debuggerd_fallback.cpp @@ -42,6 +42,7 @@ #include <android-base/file.h> #include <android-base/unique_fd.h> #include <async_safe/log.h> +#include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> @@ -80,12 +81,12 @@ static void debuggerd_fallback_trace(int output_fd, ucontext_t* ucontext) { thread.pid = getpid(); thread.tid = gettid(); thread.thread_name = get_thread_name(gettid()); - thread.registers.reset( - unwindstack::Regs::CreateFromUcontext(unwindstack::Regs::CurrentArch(), ucontext)); + unwindstack::ArchEnum arch = unwindstack::Regs::CurrentArch(); + thread.registers.reset(unwindstack::Regs::CreateFromUcontext(arch, ucontext)); // TODO: Create this once and store it in a global? unwindstack::UnwinderFromPid unwinder(kMaxFrames, getpid()); - if (unwinder.Init()) { + if (unwinder.Init(arch)) { dump_backtrace_thread(output_fd, &unwinder, thread); } else { async_safe_format_log(ANDROID_LOG_ERROR, "libc", "Unable to init unwinder."); diff --git a/debuggerd/libdebuggerd/tombstone.cpp b/debuggerd/libdebuggerd/tombstone.cpp index 4c1d63317..cc337ed30 100644 --- a/debuggerd/libdebuggerd/tombstone.cpp +++ b/debuggerd/libdebuggerd/tombstone.cpp @@ -45,6 +45,7 @@ #include <log/log.h> #include <log/logprint.h> #include <private/android_filesystem_config.h> +#include <unwindstack/DexFiles.h> #include <unwindstack/JitDebug.h> #include <unwindstack/Maps.h> #include <unwindstack/Memory.h> @@ -650,7 +651,7 @@ void engrave_tombstone_ucontext(int tombstone_fd, uint64_t abort_msg_address, si }; unwindstack::UnwinderFromPid unwinder(kMaxFrames, pid); - if (!unwinder.Init()) { + if (!unwinder.Init(unwindstack::Regs::CurrentArch())) { LOG(FATAL) << "Failed to init unwinder object."; } |