|
From: <sv...@va...> - 2012-03-01 22:05:10
|
Author: philippe
Date: 2012-03-01 22:00:36 +0000 (Thu, 01 Mar 2012)
New Revision: 12412
Log:
In case VALGRIND_MALLOCLIKE_BLOCK is wrongly used, output
the execontext where the overlapping blocks have been reported
before crashing.
Modified:
trunk/memcheck/mc_leakcheck.c
Modified: trunk/memcheck/mc_leakcheck.c
===================================================================
--- trunk/memcheck/mc_leakcheck.c 2012-03-01 13:42:18 UTC (rev 12411)
+++ trunk/memcheck/mc_leakcheck.c 2012-03-01 22:00:36 UTC (rev 12412)
@@ -1376,10 +1376,14 @@
lc_n_chunks--;
} else {
- VG_(umsg)("Block 0x%lx..0x%lx overlaps with block 0x%lx..0x%lx",
+ VG_(umsg)("Block 0x%lx..0x%lx overlaps with block 0x%lx..0x%lx\n",
start1, end1, start2, end2);
+ VG_(umsg)("Blocks allocation contexts:\n"),
+ VG_(pp_ExeContext)( ch1->where);
+ VG_(umsg)("\n"),
+ VG_(pp_ExeContext)( ch2->where);
VG_(umsg)("This is usually caused by using VALGRIND_MALLOCLIKE_BLOCK");
- VG_(umsg)("in an inappropriate way.");
+ VG_(umsg)("in an inappropriate way.\n");
tl_assert (0);
}
}
|