]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
valgrind core side for Add inner requests in VEX (cfr revision 3399)
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 27 Jul 2017 19:11:21 +0000 (19:11 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Thu, 27 Jul 2017 19:11:21 +0000 (19:11 +0000)
When running Valgrind under Valgrind, the VEX memory allocation
(temporary or permanent) was not checked, as there was no
inner request.
This patch changes VEX to mark the temporary and permanent
allocations with redzone, and memory is marked unaddressable
when the VEX temporary pool is cleared.

The changes are:
* add a file libvex_inner.h which mostly takes over what
  was in pub_core_inner.h (which now just includes libvex_inner.h)

* modify main_util.h and main_util.c to mark the temporary
  and permanent pool with memcheck pool requests to indicate
  when a block is allocated or freed.

* Impact is (should be) none, unless Valgrind is configured
  as an inner.

* Outer memcheck/inner regression tests run on gcc20 (amd64).
  Nothing (more worrying than the 3.13 self hosting) detected

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

coregrind/pub_core_inner.h

index 4dbf1b01638c7c155964e707dd8a2821662e81c7..526172006d8aeccdc529d9d4c6860213b41601c6 100644 (file)
 #ifndef __PUB_CORE_INNER_H
 #define __PUB_CORE_INNER_H
 
-//--------------------------------------------------------------------
-// PURPOSE: This header should be imported by every  file in Valgrind
-// which needs specific behaviour when running as an "inner" Valgrind.
-// Valgrind can self-host itself (i.e. Valgrind can run Valgrind) :
-// The outer Valgrind executes the inner Valgrind.
-// For more details, see README_DEVELOPPERS.
-//--------------------------------------------------------------------
-
-#include "config.h" 
-
-// The code of the inner Valgrind (core or tool code) contains client
-// requests (e.g. from helgrind.h, memcheck.h, ...) to help the
-// outer Valgrind finding (relevant) errors in the inner Valgrind.
-// Such client requests should only be compiled in for an inner Valgrind.
-// Use the macro INNER_REQUEST to allow a central enabling/disabling
-// of these client requests.
-#if defined(ENABLE_INNER)
-
-// By default, the client requests 
-// undefine the below to have an inner Valgrind without any annotation.
-#define ENABLE_INNER_CLIENT_REQUEST 1
-
-#if defined(ENABLE_INNER_CLIENT_REQUEST)
-#define INNER_REQUEST(__zza)  __zza
-#else
-#define INNER_REQUEST(__zza)  do {} while (0)
-#endif
-
-#else
-
-#define INNER_REQUEST(__zza)  do {} while (0)
-
-#endif
+// For usage and purpose, see libvex_inner.h
+#include "libvex_inner.h"
 
 #endif   // __PUB_CORE_INNER_H