[HWASan] deflake hwasan_symbolize test

Also enable on X86_64.

The directory would change during the test execution. This should not
necessarily prevent us from indexing a directory (a user might
potentially do that if they specify a parent directory of the actual
symbols directory, and change unrelated files).

Reviewed By: eugenis

Differential Revision: https://reviews.llvm.org/D125143
This commit is contained in:
Florian Mayer 2022-05-06 16:13:58 -07:00
parent e61baceedb
commit b77d16f7f3
2 changed files with 4 additions and 3 deletions

View File

@ -263,7 +263,10 @@ class Symbolizer:
for dname, _, fnames in os.walk(p):
for fn in fnames:
filename = os.path.join(dname, fn)
bid = get_buildid(filename)
try:
bid = get_buildid(filename)
except FileNotFoundError:
continue
if bid is not None:
self.__index[bid] = filename

View File

@ -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 <sanitizer/hwasan_interface.h>