From: Tom Hughes Date: Mon, 7 Sep 2009 08:58:29 +0000 (+0000) Subject: Unmap the vdso as well as suppressing it by dropping the auxv X-Git-Tag: svn/VALGRIND_3_6_0~512 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a004915a2cbdcdebafc1612427576bf3321eef5;p=thirdparty%2Fvalgrind.git 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. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10886 --- diff --git a/coregrind/m_initimg/initimg-linux.c b/coregrind/m_initimg/initimg-linux.c index 7cd836e3bc..923dafc785 100644 --- a/coregrind/m_initimg/initimg-linux.c +++ b/coregrind/m_initimg/initimg-linux.c @@ -608,6 +608,7 @@ Addr setup_client_stack( void* init_sp, # endif for (; orig_auxv->a_type != AT_NULL; auxv++, orig_auxv++) { + const NSegment *ehdrseg; /* copy the entry... */ *auxv = *orig_auxv; @@ -699,12 +700,19 @@ Addr setup_client_stack( void* init_sp, 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