git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
c065180
)
Logging: distinguish mem-allocation errors
author
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 23 May 2022 14:48:38 +0000
(15:48 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Mon, 23 May 2022 14:50:24 +0000
(15:50 +0100)
src/src/store.c
patch
|
blob
|
history
diff --git
a/src/src/store.c
b/src/src/store.c
index 5ec636bd13b9d12be3b1f64edbf13ab2577e4695..c98fcbf21b31c71fee83d7af092b34543c7ddac1 100644
(file)
--- a/
src/src/store.c
+++ b/
src/src/store.c
@@
-380,7
+380,7
@@
allocated store. */
if (size < 0 || size >= INT_MAX/2)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
if (size < 0 || size >= INT_MAX/2)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "bad memory allocation requested (%d bytes)
at
%s %d",
+ "bad memory allocation requested (%d bytes)
from
%s %d",
size, func, linenumber);
/* Round up the size to a multiple of the alignment. Although this looks a
size, func, linenumber);
/* Round up the size to a multiple of the alignment. Although this looks a
@@
-1150,8
+1150,8
@@
a negative int, to the (unsigned, wider) size_t */
if (size >= INT_MAX/2)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
if (size >= INT_MAX/2)
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
-
"bad memory allocation requested (" SIZE_T_FMT " bytes) at
%s %d",
-
size, func, line);
+
"bad internal_store_malloc request (" SIZE_T_FMT " bytes) from
%s %d",
+ size, func, line);
size += sizeof(size_t); /* space to store the size, used under debug */
if (size < 16) size = 16;
size += sizeof(size_t); /* space to store the size, used under debug */
if (size < 16) size = 16;