diff options
author | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 09:49:19 +0000 |
---|---|---|
committer | glider@chromium.org <glider@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-16 09:49:19 +0000 |
commit | b89912e30fafc2205cd20439f22195baf48b3d76 (patch) | |
tree | dd3541965b52b5b6d8586eee8ee8194667bfafb4 /third_party | |
parent | c61a96ca81ca35bb441748c961ee8603e5b3a08b (diff) | |
download | chromium_src-b89912e30fafc2205cd20439f22195baf48b3d76.zip chromium_src-b89912e30fafc2205cd20439f22195baf48b3d76.tar.gz chromium_src-b89912e30fafc2205cd20439f22195baf48b3d76.tar.bz2 |
Add a heap_check_error_exit_code flag (initialized from HEAP_CHECK_ERROR_EXIT_CODE defaulting to 1)
This is needed to distinguish Chrome test failures from leak reports on the bots.
BUG=105845, 112843
Review URL: https://chromiumcodereview.appspot.com/9404010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@122266 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/tcmalloc/chromium/src/heap-checker.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/third_party/tcmalloc/chromium/src/heap-checker.cc b/third_party/tcmalloc/chromium/src/heap-checker.cc index 5d39a47..3f5765e 100644 --- a/third_party/tcmalloc/chromium/src/heap-checker.cc +++ b/third_party/tcmalloc/chromium/src/heap-checker.cc @@ -223,6 +223,10 @@ DEFINE_int32(heap_check_delay_seconds, 0, " its checks. Report any such issues to the heap-checker" " maintainer(s)."); +DEFINE_int32(heap_check_error_exit_code, + EnvToInt("HEAP_CHECK_ERROR_EXIT_CODE", 1), + "Exit code to return if any leaks were detected."); + //---------------------------------------------------------------------- DEFINE_string(heap_profile_pprof, @@ -2076,7 +2080,8 @@ bool HeapLeakChecker::DoMainHeapCheck() { } RAW_LOG(ERROR, "Exiting with error code (instead of crashing) " "because of whole-program memory leaks"); - _exit(1); // we don't want to call atexit() routines! + // We don't want to call atexit() routines! + _exit(FLAGS_heap_check_error_exit_code); } return true; } |