]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
In case VALGRIND_MALLOCLIKE_BLOCK is wrongly used, output
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 1 Mar 2012 22:00:36 +0000 (22:00 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 1 Mar 2012 22:00:36 +0000 (22:00 +0000)
the execontext where the overlapping blocks have been reported
before crashing.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12412

memcheck/mc_leakcheck.c

index 8d462b94c70cee7e5af23077179dece88d1e1654..edd19b8fa466e7f27017a8fee6ae53c1a7a02dae 100644 (file)
@@ -1376,10 +1376,14 @@ void MC_(detect_memory_leaks) ( ThreadId tid, LeakCheckParams* lcp)
          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);
       }
    }