From 0aec7a511bb10b77b3d1349d52394e33d0de39b2 Mon Sep 17 00:00:00 2001 From: Sandboxed API Team Date: Wed, 18 Sep 2019 08:31:48 -0700 Subject: [PATCH] Don't try to parse "[vsyscall]" as an ELF image. PiperOrigin-RevId: 269811752 Change-Id: I2118badab9b5392eae7bfd36583384a33ab8a7d5 --- sandboxed_api/sandbox2/unwind/unwind.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sandboxed_api/sandbox2/unwind/unwind.cc b/sandboxed_api/sandbox2/unwind/unwind.cc index 7852d5f..82fd86b 100644 --- a/sandboxed_api/sandbox2/unwind/unwind.cc +++ b/sandboxed_api/sandbox2/unwind/unwind.cc @@ -180,7 +180,10 @@ void RunLibUnwindAndSymbolizer(pid_t pid, std::string* stack_trace_out, addr_to_symbol[entry.end] = ""; } - if (!entry.path.empty() && entry.path != "[vdso]" && entry.is_executable) { + const bool should_parse = entry.is_executable && !entry.path.empty() && + entry.path != "[vdso]" && + entry.path != "[vsyscall]"; + if (should_parse) { auto elf_or = ElfFile::ParseFromFile(entry.path, ElfFile::kLoadSymbols); if (!elf_or.ok()) { SAPI_RAW_LOG(WARNING, "Could not load symbols for %s: %s", entry.path,