mirror of
https://github.com/gperftools/gperftools
synced 2025-02-28 10:00:26 +00:00
issue-405: Added a tunable to the heap checker that allows the heap checker error exit code to be overridden. For larger projects this allows certain heap checked programs that have intentional/known leaks to be managed.
git-svn-id: http://gperftools.googlecode.com/svn/trunk@147 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
This commit is contained in:
parent
0a9d3f8af3
commit
68df7fa605
@ -223,6 +223,10 @@ DEFINE_int32(heap_check_delay_seconds, 0,
|
|||||||
" its checks. Report any such issues to the heap-checker"
|
" its checks. Report any such issues to the heap-checker"
|
||||||
" maintainer(s).");
|
" 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,
|
DEFINE_string(heap_profile_pprof,
|
||||||
@ -2157,7 +2161,8 @@ bool HeapLeakChecker::DoMainHeapCheck() {
|
|||||||
}
|
}
|
||||||
RAW_LOG(ERROR, "Exiting with error code (instead of crashing) "
|
RAW_LOG(ERROR, "Exiting with error code (instead of crashing) "
|
||||||
"because of whole-program memory leaks");
|
"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;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user