diff --git a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize --- a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize +++ b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize @@ -89,12 +89,16 @@ return result def get_buildid(filename): - with open(filename, "r") as fd: - if os.fstat(fd.fileno()).st_size < Ehdr_size: - return None - with mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_READ) as m: - with memoryview(m) as mv: - return handle_elf(mv) + try: + with open(filename, "r") as fd: + if os.fstat(fd.fileno()).st_size < Ehdr_size: + return None + with mmap.mmap(fd.fileno(), 0, access=mmap.ACCESS_READ) as m: + with memoryview(m) as mv: + return handle_elf(mv) + except FileNotFoundError: + # Ignore if the filesystem changed under us. + return None class Symbolizer: def __init__(self, path, binary_prefixes, paths_to_cut): diff --git a/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp b/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp --- a/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp +++ b/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp @@ -4,8 +4,6 @@ // RUN: %env_hwasan_opts=symbolize=0 not %run %t 2>&1 | hwasan_symbolize --html --linkify %t.linkify --symbols $(dirname %t) --index | FileCheck --check-prefixes=CHECK,LINKIFY %s // RUN: %env_hwasan_opts=symbolize=0 not %run %t 2>&1 | hwasan_symbolize --symbols $(dirname %t) --index | FileCheck %s -// There are currently unrelated problems on x86_64, so skipping for now. -// REQUIRES: android // REQUIRES: stable-runtime #include