summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/exim.c2
-rw-r--r--src/src/functions.h1
-rw-r--r--src/src/store.c3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/src/exim.c b/src/src/exim.c
index 23e206d2a..ea4286af3 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -232,7 +232,7 @@ exit(1);
***********************************************/
#define STACKDUMP_MAX 24
-static void
+void
stackdump(void)
{
#ifndef NO_EXECINFO
diff --git a/src/src/functions.h b/src/src/functions.h
index e71823410..92a4831e3 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -547,6 +547,7 @@ extern int stdin_ferror(void);
extern BOOL stdin_hasc(void);
extern int stdin_ungetc(int);
+extern void stackdump(void);
extern void store_exit(void);
extern void store_init(void);
extern void store_writeprotect(int);
diff --git a/src/src/store.c b/src/src/store.c
index c98fcbf21..d99d2ab69 100644
--- a/src/src/store.c
+++ b/src/src/store.c
@@ -274,6 +274,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;
+#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;