|
From: <sv...@va...> - 2009-09-07 08:58:43
|
Author: tom
Date: 2009-09-07 09:58:29 +0100 (Mon, 07 Sep 2009)
New Revision: 10886
Log:
Unmap the vdso as well as suppressing it by dropping the auxv
entry as on some systems the vdso will be at a random address
and can conflict with things like wine that need to tightly
control where things are mapped.
Modified:
trunk/coregrind/m_initimg/initimg-linux.c
Modified: trunk/coregrind/m_initimg/initimg-linux.c
===================================================================
--- trunk/coregrind/m_initimg/initimg-linux.c 2009-09-04 13:03:41 UTC (rev 10885)
+++ trunk/coregrind/m_initimg/initimg-linux.c 2009-09-07 08:58:29 UTC (rev 10886)
@@ -608,6 +608,7 @@
# endif
for (; orig_auxv->a_type != AT_NULL; auxv++, orig_auxv++) {
+ const NSegment *ehdrseg;
/* copy the entry... */
*auxv = *orig_auxv;
@@ -699,12 +700,19 @@
break;
case AT_SYSINFO:
+ /* Trash this, because we don't reproduce it */
+ auxv->a_type = AT_IGNORE;
+ break;
+
# if !defined(VGP_ppc32_linux) && !defined(VGP_ppc64_linux)
case AT_SYSINFO_EHDR:
-# endif
/* Trash this, because we don't reproduce it */
+ ehdrseg = VG_(am_find_nsegment)((Addr)auxv->u.a_ptr);
+ vg_assert(ehdrseg);
+ VG_(am_munmap_valgrind)(ehdrseg->start, ehdrseg->end - ehdrseg->start);
auxv->a_type = AT_IGNORE;
break;
+# endif
case AT_RANDOM:
/* points to 16 random bytes - we need to ensure this is
|