[llvm-branch-commits] [compiler-rt] b1dd1a0 - [msan] Do not use 77 as exit code, instead use 1
Evgenii Stepanov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Thu Dec 10 14:46:48 PST 2020
Author: Florian Schmaus
Date: 2020-12-10T14:23:12-08:00
New Revision: b1dd1a099771543cf0ca133b6342af1b3ce61a44
URL: https://github.com/llvm/llvm-project/commit/b1dd1a099771543cf0ca133b6342af1b3ce61a44
DIFF: https://github.com/llvm/llvm-project/commit/b1dd1a099771543cf0ca133b6342af1b3ce61a44.diff
LOG: [msan] Do not use 77 as exit code, instead use 1
MSan uses 77 as exit code since it appeared with c5033786ba34 ("[msan]
MemorySanitizer runtime."). However, Test runners like the one from
Meson use the GNU standard approach where a exit code of 77 signals
that the test should be skipped [1]. As a result Meson's test runner
reports tests as skipped if MSan is enabled and finds issues:
build $ meson test
ninja: Entering directory `/home/user/code/project/build'
ninja: no work to do.
1/1 PROJECT:all / SimpleTest SKIP 0.09s
I could not find any rationale why 77 was initially chosen, and I
found no other clang sanitizer that uses this value as exit
code. Hence I believe it is safe to change this to a safe
default. You can restore the old behavior by setting the environment
variable MSAN_OPTIONS to "exitcode=77", e.g.
export MSAN_OPTIONS="exitcode=77"
1: https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors
Reviewed By: #sanitizers, eugenis
Differential Revision: https://reviews.llvm.org/D92490
Added:
Modified:
compiler-rt/lib/msan/msan.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/msan/msan.cpp b/compiler-rt/lib/msan/msan.cpp
index 7abb3b4b65dc..4be1630cd302 100644
--- a/compiler-rt/lib/msan/msan.cpp
+++ b/compiler-rt/lib/msan/msan.cpp
@@ -151,7 +151,6 @@ static void InitializeFlags() {
// FIXME: test and enable.
cf.check_printf = false;
cf.intercept_tls_get_addr = true;
- cf.exitcode = 77;
OverrideCommonFlags(cf);
}
More information about the llvm-branch-commits
mailing list