mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-14 14:41:42 +03:00
Update safety check message to remove --enable-debug when it's already on.
This commit is contained in:
parent
b71da25b8a
commit
7d563a8f81
1 changed files with 4 additions and 3 deletions
|
|
@ -7,12 +7,13 @@ void safety_check_fail_sized_dealloc(bool current_dealloc, const void *ptr,
|
||||||
size_t true_size, size_t input_size) {
|
size_t true_size, size_t input_size) {
|
||||||
char *src = current_dealloc ? "the current pointer being freed" :
|
char *src = current_dealloc ? "the current pointer being freed" :
|
||||||
"in thread cache, possibly from previous deallocations";
|
"in thread cache, possibly from previous deallocations";
|
||||||
|
char *suggest_debug_build = config_debug ? "" : " --enable-debug or";
|
||||||
|
|
||||||
safety_check_fail("<jemalloc>: size mismatch detected (true size %zu "
|
safety_check_fail("<jemalloc>: size mismatch detected (true size %zu "
|
||||||
"vs input size %zu), likely caused by application sized "
|
"vs input size %zu), likely caused by application sized "
|
||||||
"deallocation bugs (source address: %p, %s). Suggest building with "
|
"deallocation bugs (source address: %p, %s). Suggest building with"
|
||||||
"--enable-debug or address sanitizer for debugging. Abort.\n",
|
"%s address sanitizer for debugging. Abort.\n",
|
||||||
true_size, input_size, ptr, src);
|
true_size, input_size, ptr, src, suggest_debug_build);
|
||||||
}
|
}
|
||||||
|
|
||||||
void safety_check_set_abort(safety_check_abort_hook_t abort_fn) {
|
void safety_check_set_abort(safety_check_abort_hook_t abort_fn) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue