From f453f00d1e66dff0a5e94f50e70f699c1a1e7abe Mon Sep 17 00:00:00 2001 From: Kern Sibbald Date: Mon, 19 Jul 2010 13:39:29 +0200 Subject: [PATCH] Add debug info to smartall.c for buffer overrun --- bacula/src/lib/smartall.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bacula/src/lib/smartall.c b/bacula/src/lib/smartall.c index f3f899b535..db2066d0e5 100644 --- a/bacula/src/lib/smartall.c +++ b/bacula/src/lib/smartall.c @@ -212,6 +212,9 @@ void sm_free(const char *file, int line, void *fp) if (((unsigned char *)cp)[head->ablen - 1] != ((((intptr_t) cp) & 0xFF) ^ 0xC5)) { V(mutex); + Dmsg4(0, "Overrun buffer: len=%d addr=%p allocated: %s:%d\n", + head->ablen, fp, + head->abfname, head->ablineno); Emsg2(M_ABORT, 0, _("Buffer overrun called from %s:%d\n"), file, line); } if (sm_buffers > 0) { -- 2.39.5