Skip to content

Commit 8ab7625

Browse files
committed
[compiler-rt] Disable default config files for tests
Without this, if hardening measures like FORTIFY_SOURCE are are in /etc/clang/*.cfg, many sanitizer tests will die before the sanitizer can trap the problem being tested, because e.g. the _chk variants of common functions will abort first. This gets the number of failing tests down from 42->3 for me (and the remaining 3 are unrelated). See: 52ce677 See: 136f778 Closes: llvm#60394 Reviewed By: MaskRay Differential Revision: https://reviews.llvm.org/D143322
1 parent 5404ee3 commit 8ab7625

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler-rt/test/lit.common.cfg.py

+7
Original file line numberDiff line numberDiff line change
@@ -733,3 +733,10 @@ def is_windows_lto_supported():
733733
sh_quote(get_ios_commands_dir())
734734
))
735735
)
736+
737+
# It is not realistically possible to account for all options that could
738+
# possibly be present in system and user configuration files, so disable
739+
# default configs for the test runs. In particular, anything hardening
740+
# related is likely to cause issues with sanitizer tests, because it may
741+
# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN).
742+
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"

0 commit comments

Comments
 (0)