From: Julian Seward Date: Thu, 3 Dec 2009 09:50:38 +0000 (+0000) Subject: Testing hacklet, to fill the vex tmp allocation area before each X-Git-Tag: svn/VALGRIND_3_6_1^2~122 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c4d3a1e7029ab00fe84000c6d2e2afabbef3bb11;p=thirdparty%2Fvalgrind.git Testing hacklet, to fill the vex tmp allocation area before each translation, with 0x00 or 0xFF or whatever. git-svn-id: svn://svn.valgrind.org/vex/trunk@1938 --- diff --git a/VEX/priv/main_util.c b/VEX/priv/main_util.c index 0bba6d4bbb..097a8ddf64 100644 --- a/VEX/priv/main_util.c +++ b/VEX/priv/main_util.c @@ -192,6 +192,16 @@ void vexSetAllocModeTEMP_and_clear ( void ) mode = VexAllocModeTEMP; temporary_curr = &temporary[0]; private_LibVEX_alloc_curr = &temporary[0]; + + /* Set to (1) and change the fill byte to 0x00 or 0xFF to test for + any potential bugs due to using uninitialised memory in the main + VEX storage area. */ + if (0) { + Int i; + for (i = 0; i < N_TEMPORARY_BYTES; i++) + temporary[i] = 0x00; + } + vexAllocSanityCheck(); }