Skip to content

Commit 95bde4b

Browse files
authored
[MSan] Pass -fsanitize-ignorelist to the instrumented libcxxabi
This ensures that the MSan unit tests are able to pass with an uninstrumented libunwind. We need to avoid instrumentation for __gxx_personality_v0, which is part of the default msan_ignorelist.txt that is installed into the resource directory. However, if we are trying to test the just-built libraries, this global ignore list may not be present yet, so we still instrument the function. Arguably this function should not be on the default ignore list since it is only a problem when building libcxxabi with MSan instrumentation and without an instrumented libunwind, so maybe the logic should really be part of the libcxxabi build. However, that could be done as a follow-up. See 2f856a3 for more context. Reviewed By: vitalybuka Pull Request: llvm#83652
1 parent 4067115 commit 95bde4b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler-rt/lib/msan/tests/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ set(MSAN_LIBCXX_CFLAGS
1010
-fsanitize-memory-track-origins
1111
-fno-sanitize-memory-param-retval # unittests test mostly this mode.
1212
-Wno-pedantic
13-
-Xclang -fdepfile-entry=${COMPILER_RT_OUTPUT_DIR}/share/msan_ignorelist.txt
13+
# Do not instrument __gxx_personality_v0 (part of libcxxabi)
14+
-fsanitize-ignorelist=${COMPILER_RT_OUTPUT_DIR}/share/msan_ignorelist.txt
1415
)
1516

1617
# Unittest sources and build flags.

0 commit comments

Comments
 (0)