[compiler-rt] b77d16f - [HWASan] deflake hwasan_symbolize test

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 14:12:00 PDT 2022


Author: Florian Mayer
Date: 2022-05-09T14:11:52-07:00
New Revision: b77d16f7f392e057bd6ffe6220deac15a1c8beca

URL: https://github.com/llvm/llvm-project/commit/b77d16f7f392e057bd6ffe6220deac15a1c8beca
DIFF: https://github.com/llvm/llvm-project/commit/b77d16f7f392e057bd6ffe6220deac15a1c8beca.diff

LOG: [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

Added: 
    

Modified: 
    compiler-rt/lib/hwasan/scripts/hwasan_symbolize
    compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
index 8884d77c7209..ba11ee4ceedc 100755
--- a/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
+++ b/compiler-rt/lib/hwasan/scripts/hwasan_symbolize
@@ -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
 

diff  --git a/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp b/compiler-rt/test/hwasan/TestCases/hwasan_symbolize.cpp
index ca2bfcb21da8..abd8bc42a34b 100644
--- 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 <sanitizer/hwasan_interface.h>


        


More information about the llvm-commits mailing list