git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidying
[exim.git]
/
src
/
src
/
store.c
diff --git
a/src/src/store.c
b/src/src/store.c
index 5ec636bd13b9d12be3b1f64edbf13ab2577e4695..9e4536eaedf56b741ac5619a1cd8742a54924a18 100644
(file)
--- a/
src/src/store.c
+++ b/
src/src/store.c
@@
-5,6
+5,7
@@
/* Copyright (c) The Exim maintainers 2019 - 2022 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* Copyright (c) The Exim maintainers 2019 - 2022 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
/* Exim gets and frees all its store through these functions. In the original
implementation there was a lot of mallocing and freeing of small bits of store.
/* Exim gets and frees all its store through these functions. In the original
implementation there was a lot of mallocing and freeing of small bits of store.
@@
-274,6
+275,9
@@
for (pp = paired_pools; pp < paired_pools + N_PAIRED_POOLS; pp++)
for (b = pp->chainbase; b; b = b->next)
if (is_pointer_in_block(b, p)) return pp;
for (b = pp->chainbase; b; b = b->next)
if (is_pointer_in_block(b, p)) return pp;
+#ifndef COMPILE_UTILITY
+stackdump();
+#endif
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"bad memory reference; pool not found, at %s %d", func, linenumber);
return NULL;
log_write(0, LOG_MAIN|LOG_PANIC_DIE,
"bad memory reference; pool not found, at %s %d", func, linenumber);
return NULL;
@@
-380,7
+384,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
+1154,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;