|
From: <sv...@va...> - 2017-07-27 19:11:28
|
Author: philippe
Date: Thu Jul 27 20:11:21 2017
New Revision: 16462
Log:
valgrind core side for Add inner requests in VEX (cfr revision 3399)
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
Modified:
trunk/coregrind/pub_core_inner.h
Modified: trunk/coregrind/pub_core_inner.h
==============================================================================
--- trunk/coregrind/pub_core_inner.h (original)
+++ trunk/coregrind/pub_core_inner.h Thu Jul 27 20:11:21 2017
@@ -31,39 +31,8 @@
#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
|