aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am3
-rw-r--r--configure.in3
-rw-r--r--include/pub_tool_tooliface.h2
-rw-r--r--include/valgrind.h18
4 files changed, 15 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index b6612e72c..fee978562 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,8 @@ TOOLS = memcheck \
callgrind \
massif \
lackey \
- none
+ none \
+ memtrace
# Temporary: we want to compile Helgrind, but not regtest it.
# Put docs last because building the HTML is slow and we want to get
diff --git a/configure.in b/configure.in
index f625a9ef5..34830a0ea 100644
--- a/configure.in
+++ b/configure.in
@@ -931,6 +931,9 @@ AC_OUTPUT(
none/tests/ppc64/Makefile
none/tests/x86/Makefile
none/docs/Makefile
+ memtrace/Makefile
+ memtrace/tests/Makefile
+ memtrace/docs/Makefile
)
cat<<EOF
diff --git a/include/pub_tool_tooliface.h b/include/pub_tool_tooliface.h
index 89128b2f3..c28010d4a 100644
--- a/include/pub_tool_tooliface.h
+++ b/include/pub_tool_tooliface.h
@@ -32,7 +32,7 @@
#define __PUB_TOOL_TOOLIFACE_H
#include "pub_tool_errormgr.h" // for Error, Supp
-#include "libvex.h" // for VexGuestLayout
+#include "libvex.h" // for all Vex stuff
/* ------------------------------------------------------------------ */
/* The interface version */
diff --git a/include/valgrind.h b/include/valgrind.h
index ae82e25c9..dafc0d910 100644
--- a/include/valgrind.h
+++ b/include/valgrind.h
@@ -3715,15 +3715,15 @@ VALGRIND_PRINTF_BACKTRACE(const char *format, ...)
for calloc(). Put it immediately after the point where a block is
allocated.
- If you're allocating memory via superblocks, and then handing out small
- chunks of each superblock, if you don't have redzones on your small
- blocks, it's worth marking the superblock with VALGRIND_MAKE_MEM_NOACCESS
- when it's created, so that block overruns are detected. But if you can
- put redzones on, it's probably better to not do this, so that messages
- for small overruns are described in terms of the small block rather than
- the superblock (but if you have a big overrun that skips over a redzone,
- you could miss an error this way). See memcheck/tests/custom_alloc.c
- for an example.
+ If you're using Memcheck: If you're allocating memory via superblocks,
+ and then handing out small chunks of each superblock, if you don't have
+ redzones on your small blocks, it's worth marking the superblock with
+ VALGRIND_MAKE_MEM_NOACCESS when it's created, so that block overruns are
+ detected. But if you can put redzones on, it's probably better to not do
+ this, so that messages for small overruns are described in terms of the
+ small block rather than the superblock (but if you have a big overrun
+ that skips over a redzone, you could miss an error this way). See
+ memcheck/tests/custom_alloc.c for an example.
WARNING: if your allocator uses malloc() or 'new' to allocate
superblocks, rather than mmap() or brk(), this will not work properly --