[compiler-rt] [UBSan] Fix test-darwin-interface.c on X86 Darwin with Internal Shell (PR #169105)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 21 14:03:40 PST 2025
https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/169105
This test was failing with the internal shell due to the use of subshells. This was not caught in my initial round of testing due to me only using a M4 Mac for running my tests.
>From cc6abf5b0a4c8967b265397d0c83819ae74aed2b Mon Sep 17 00:00:00 2001
From: Aiden Grossman <aidengrossman at google.com>
Date: Fri, 21 Nov 2025 22:02:02 +0000
Subject: [PATCH] [UBSan] Fix test-darwin-interface.c on X86 Darwin with
Internal Shell
This test was failing with the internal shell due to the use of
subshells. This was not caught in my initial round of testing due to me
only using a M4 Mac for running my tests.
---
.../ubsan_minimal/TestCases/test-darwin-interface.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c b/compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c
index abc1073e02073..849401ef78741 100644
--- a/compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c
+++ b/compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c
@@ -3,11 +3,19 @@
//
// REQUIRES: x86_64-darwin
-// RUN: nm -jgU `%clangxx_min_runtime -fsanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | grep "libclang_rt.ubsan_minimal_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.ubsan_minimal_osx_dynamic.dylib\)".*/\1/'` | grep "^___ubsan_handle" \
+// RUN: %clangxx_min_runtime -fsanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | \
+// RUN: grep "libclang_rt.ubsan_minimal_osx_dynamic.dylib" | \
+// RUN: sed -e 's/.*"\(.*libclang_rt.ubsan_minimal_osx_dynamic.dylib\)".*/\1/' | \
+// RUN: tr -d '\n' > %t.dylib_path1
+// RUN: nm -jgU %{readfile:%t.dylib_path1} | grep "^___ubsan_handle" \
// RUN: | sed 's/_minimal//g' \
// RUN: > %t.minimal.symlist
//
-// RUN: nm -jgU `%clangxx_min_runtime -fno-sanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | grep "libclang_rt.ubsan_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.ubsan_osx_dynamic.dylib\)".*/\1/'` | grep "^___ubsan_handle" \
+// RUN: %clangxx_min_runtime -fno-sanitize-minimal-runtime -fsanitize=undefined %s -o %t '-###' 2>&1 | \
+// RUN: grep "libclang_rt.ubsan_osx_dynamic.dylib" | \
+// RUN: sed -e 's/.*"\(.*libclang_rt.ubsan_osx_dynamic.dylib\)".*/\1/' | \
+// RUN: tr -d '\n' > %t.dylib_path2
+// RUN: nm -jgU %{readfile:%t.dylib_path2} | grep "^___ubsan_handle" \
// RUN: | grep -vE "^___ubsan_handle_dynamic_type_cache_miss" \
// RUN: | grep -vE "^___ubsan_handle_cfi_bad_type" \
// RUN: | sed 's/_v1//g' \
More information about the llvm-commits
mailing list