Re: [exim] 4.96-RC1 issue

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] 4.96-RC1 issue
On 24/05/2022 06:25, Laura Williamson via Exim-users wrote:
> willing to do some source code mods to try to solve this, are stuck with 4.94.2 now as 4.95 does the same.


Please apply this patch, so we can tell which of
the two possible places is detecting the odd alloc size:
--
Cheers,
JeremyFrom ee8d56f9f308c79ab49c41afb2031a6a31bcf272 Mon Sep 17 00:00:00 2001
From: Jeremy Harris <jgh146exb@???>
Date: Mon, 23 May 2022 15:48:38 +0100
Subject: Logging: distinguish mem-allocation errors


diff --git a/src/src/store.c b/src/src/store.c
index 5ec636bd1..c98fcbf21 100644
--- 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,
-            "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
@@ -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,
-            "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;