X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fsrc%2Flib%2Fsmartall.c;h=db2066d0e57a883a3e7fb4d3d1634a1e7f34f4ca;hb=897707854a8240d026e933215009f931bb9c5762;hp=6bd139ce51b42759e4320d7efef8e4242525dfd7;hpb=1e6a50b518f2135fffbcea9d3df003d0bf1f9ca0;p=bacula%2Fbacula diff --git a/bacula/src/lib/smartall.c b/bacula/src/lib/smartall.c index 6bd139ce51..db2066d0e5 100644 --- a/bacula/src/lib/smartall.c +++ b/bacula/src/lib/smartall.c @@ -6,7 +6,7 @@ The main author of Bacula is Kern Sibbald, with contributions from many others, a complete list can be found in the file AUTHORS. This program is Free Software; you can redistribute it and/or - modify it under the terms of version two of the GNU General Public + modify it under the terms of version three of the GNU Affero General Public License as published by the Free Software Foundation and included in the file LICENSE. @@ -15,7 +15,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Affero General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -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) { @@ -398,7 +401,7 @@ void sm_dump(bool bufdump, bool in_use) uint32_t memsize = ap->ablen - (HEAD_SIZE + 1); char *cp = ((char *)ap) + HEAD_SIZE; - Pmsg0(0, "%s buffer: %s %d bytes at %p from %s:%d\n", + Pmsg6(0, "%s buffer: %s %d bytes at %p from %s:%d\n", in_use?"In use":"Orphaned", my_name, memsize, cp, ap->abfname, ap->ablineno); if (bufdump) {