Don't try to parse "[vsyscall]" as an ELF image.

PiperOrigin-RevId: 269811752
Change-Id: I2118badab9b5392eae7bfd36583384a33ab8a7d5
This commit is contained in:
Sandboxed API Team 2019-09-18 08:31:48 -07:00 committed by Copybara-Service
parent 846717def1
commit 0aec7a511b

View File

@ -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,