From: Robert Walsh Date: Mon, 23 Aug 2004 18:13:16 +0000 (+0000) Subject: Fix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does X-Git-Tag: svn/VALGRIND_2_2_0~30 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b909972be320fbe8465e52454c72efe29866481;p=thirdparty%2Fvalgrind.git Fix to allow 32-bit Valgrind to run on AMD64 boxes. Note: this does NOT allow Valgrind to work with 64-bit executables - only with 32-bit executables on an AMD64 box. VG_(valgrind_end) now has a slightly different meaning to all the other VG_(*_end) vars -- ie. it names the last byte, whereas the others go one byte past the end. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@2606 --- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index ab374da909..10d50d11b0 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -432,7 +432,7 @@ static void layout_remaining_space(Addr argc_addr, float ratio) addr_t client_size, shadow_size; VG_(valgrind_base) = (addr_t)&kickstart_base; - VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000); // stack + VG_(valgrind_end) = ROUNDUP(argc_addr, 0x10000) - 1; // stack // This gives the client the largest possible address space while // taking into account the tool's shadow needs.