1// Check that the ubsan and ubsan-minimal runtimes have the same symbols,
2// making exceptions as necessary.
3//
4// REQUIRES: x86_64-darwin
5
6// RUN: nm -jgU `%clangxx -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" \
7// RUN: | sed 's/_minimal//g' \
8// RUN: > %t.minimal.symlist
9//
10// RUN: nm -jgU `%clangxx -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" \
11// RUN: | grep -vE "^___ubsan_handle_dynamic_type_cache_miss" \
12// RUN: | grep -vE "^___ubsan_handle_cfi_bad_type" \
13// RUN: | sed 's/_v1//g' \
14// RUN: > %t.full.symlist
15//
16// RUN: diff %t.minimal.symlist %t.full.symlist
17

source code of compiler-rt/test/ubsan_minimal/TestCases/test-darwin-interface.c