diff options
author | Sam James <sam@gentoo.org> | 2023-02-04 18:04:05 +0000 |
---|---|---|
committer | Tobias Hieta <tobias@hieta.se> | 2023-02-05 21:15:13 +0100 |
commit | ccc916a82734d59a6aad625e928835e333bf9b19 (patch) | |
tree | e8970851bc3923645e14ffcf185faccdfb127151 | |
parent | 06af31a87296a128ac660235ec2a5c66a63b0d70 (diff) | |
download | llvm-ccc916a82734d59a6aad625e928835e333bf9b19.tar.gz |
[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: 52ce6776cf98e993c6ec04ae54b52e1354fff917
See: 136f77805fd89cd30e69b3d1204fbf7efedd9a12
Closes: https://github.com/llvm/llvm-project/issues/60394
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D143322
(cherry picked from commit 8ab762557fb057af1a3015211ee116a975027e78)
-rw-r--r-- | compiler-rt/test/lit.common.cfg.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/test/lit.common.cfg.py b/compiler-rt/test/lit.common.cfg.py index a391a2523544..a4d2495beddb 100644 --- a/compiler-rt/test/lit.common.cfg.py +++ b/compiler-rt/test/lit.common.cfg.py @@ -733,3 +733,10 @@ if config.host_os == 'Darwin': sh_quote(get_ios_commands_dir()) )) ) + +# It is not realistically possible to account for all options that could +# possibly be present in system and user configuration files, so disable +# default configs for the test runs. In particular, anything hardening +# related is likely to cause issues with sanitizer tests, because it may +# preempt something we're looking to trap (e.g. FORTIFY_SOURCE vs our ASAN). +config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1" |