[compiler-rt] dc37287 - [asan] Fix read_binary_name_regtest.c test dying with SIGPIPE

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 26 05:37:41 PDT 2020


Author: Ilya Leoshkevich
Date: 2020-03-26T13:34:18+01:00
New Revision: dc37287320cc074a49d73035674891be06c65a42

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

LOG: [asan] Fix read_binary_name_regtest.c test dying with SIGPIPE

Disable symbolization of results, since llvm-symbolizer cannot start
due to restricted readlink(), causing the test to die with SIGPIPE.

Author: Ilya Leoshkevich
Reviewed By: Evgenii Stepanov

Differential Revision: https://reviews.llvm.org/D76576

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
index 2cb22fa29cb2..08bf5e125cf4 100644
--- a/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
+++ b/compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c
@@ -2,7 +2,11 @@
 // the binary name because of sandbox restrictions.
 // This test uses seccomp-BPF to restrict the readlink() system call and makes
 // sure ASan is still able to
-// RUN: not ls /usr/include/linux/seccomp.h || ( %clang_asan %s -o %t && ( not %run %t 2>&1 ) | FileCheck %s )
+// Disable symbolizing results, since this will invoke llvm-symbolizer, which
+// will be unable to resolve its $ORIGIN due to readlink() restriction and will
+// thus fail to start, causing the test to die with SIGPIPE when attempting to
+// talk to it.
+// RUN: not ls /usr/include/linux/seccomp.h || ( %clang_asan %s -o %t && ( not env ASAN_OPTIONS=symbolize=0 %run %t 2>&1 ) | FileCheck %s )
 // REQUIRES: shell
 // UNSUPPORTED: android
 


        


More information about the llvm-commits mailing list