diff options
Diffstat (limited to 'compiler-rt/lib/lsan')
| -rw-r--r-- | compiler-rt/lib/lsan/lsan.cc | 1 | ||||
| -rw-r--r-- | compiler-rt/lib/lsan/lsan_common.cc | 4 | ||||
| -rw-r--r-- | compiler-rt/lib/lsan/lsan_flags.inc | 2 |
3 files changed, 3 insertions, 4 deletions
diff --git a/compiler-rt/lib/lsan/lsan.cc b/compiler-rt/lib/lsan/lsan.cc index 91c29b9c1c6..f3e6ad7c9cb 100644 --- a/compiler-rt/lib/lsan/lsan.cc +++ b/compiler-rt/lib/lsan/lsan.cc @@ -44,6 +44,7 @@ static void InitializeFlags() { cf.external_symbolizer_path = GetEnv("LSAN_SYMBOLIZER_PATH"); cf.malloc_context_size = 30; cf.detect_leaks = true; + cf.exitcode = 23; OverrideCommonFlags(cf); } diff --git a/compiler-rt/lib/lsan/lsan_common.cc b/compiler-rt/lib/lsan/lsan_common.cc index 0ffba505cc7..46daefeeba3 100644 --- a/compiler-rt/lib/lsan/lsan_common.cc +++ b/compiler-rt/lib/lsan/lsan_common.cc @@ -444,10 +444,10 @@ void DoLeakCheck() { if (!have_leaks) { return; } - if (flags()->exitcode) { + if (common_flags()->exitcode) { if (common_flags()->coverage) __sanitizer_cov_dump(); - internal__exit(flags()->exitcode); + internal__exit(common_flags()->exitcode); } } diff --git a/compiler-rt/lib/lsan/lsan_flags.inc b/compiler-rt/lib/lsan/lsan_flags.inc index b19b3452b2f..c405005deed 100644 --- a/compiler-rt/lib/lsan/lsan_flags.inc +++ b/compiler-rt/lib/lsan/lsan_flags.inc @@ -24,8 +24,6 @@ LSAN_FLAG( "Aggregate two objects into one leak if this many stack frames match. If " "zero, the entire stack trace must match.") LSAN_FLAG(int, max_leaks, 0, "The number of leaks reported.") -LSAN_FLAG(int, exitcode, 23, - "If nonzero kill the process with this exit code upon finding leaks.") // Flags controlling the root set of reachable memory. LSAN_FLAG(bool, use_globals, true, |

