summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-08-21 20:49:37 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-08-21 20:49:37 +0000
commitbb79b06f4e40d85d6c1b0ff2098e9aa5d6afce5d (patch)
tree69de2072c26b79701e96b368a1f564ec44488214 /compiler-rt/lib/tsan/rtl/tsan_rtl.cc
parentdddad102418960e8dc187233fff849c1ce9badf4 (diff)
downloadbcm5719-llvm-bb79b06f4e40d85d6c1b0ff2098e9aa5d6afce5d.tar.gz
bcm5719-llvm-bb79b06f4e40d85d6c1b0ff2098e9aa5d6afce5d.zip
[Sanitizers] Unify the semantics and usage of "exitcode" runtime flag across all sanitizers.
Summary: Merge "exitcode" flag from ASan, LSan, TSan and "exit_code" from MSan into one entity. Additionally, make sure sanitizer_common now uses the value of common_flags()->exitcode when dying on error, so that this flag will automatically work for other sanitizers (UBSan and DFSan) as well. User-visible changes: * "exit_code" MSan runtime flag is now deprecated. If explicitly specified, this flag will take precedence over "exitcode". The users are encouraged to migrate to the new version. * __asan_set_error_exit_code() and __msan_set_exit_code() functions are removed. With few exceptions, we don't support changing runtime flags during program execution - we can't make them thread-safe. The users should use __sanitizer_set_death_callback() that would call _exit() with proper exit code instead. * Plugin tools (LSan and UBSan) now inherit the exit code of the parent tool. In particular, this means that ASan would now crash the program with exit code "1" instead of "23" if it detects leaks. Reviewers: kcc, eugenis Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D12120 llvm-svn: 245734
Diffstat (limited to 'compiler-rt/lib/tsan/rtl/tsan_rtl.cc')
-rw-r--r--compiler-rt/lib/tsan/rtl/tsan_rtl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
index 9ec84b8811d..264fdf90221 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cc
@@ -417,7 +417,7 @@ int Finalize(ThreadState *thr) {
StatOutput(ctx->stat);
#endif
- return failed ? flags()->exitcode : 0;
+ return failed ? common_flags()->exitcode : 0;
}
#ifndef SANITIZER_GO
OpenPOWER on IntegriCloud