From dc37287320cc074a49d73035674891be06c65a42 Mon Sep 17 00:00:00 2001 From: Ilya Leoshkevich Date: Thu, 26 Mar 2020 13:31:02 +0100 Subject: [PATCH] [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 --- compiler-rt/test/asan/TestCases/Linux/read_binary_name_regtest.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 2cb22fa..08bf5e1 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 -- 2.7.4