From: Julian Seward Date: Mon, 6 Dec 2004 14:24:52 +0000 (+0000) Subject: Ensure VEX control parameters are sane. X-Git-Tag: svn/VALGRIND_3_0_0~1135 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dfd443a0c4555341f02f4658b6acdd9f21b61bc9;p=thirdparty%2Fvalgrind.git Ensure VEX control parameters are sane. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3183 --- diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 808e77cb96..b0c286a672 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -1858,7 +1858,17 @@ static void process_cmd_line_options( UInt* client_auxv, const char* toolname ) } } - // Check various option values + /* Make VEX control parameters sane */ + + if (VG_(clo_vex_control).guest_chase_thresh + >= VG_(clo_vex_control).guest_max_insns) + VG_(clo_vex_control).guest_chase_thresh + = VG_(clo_vex_control).guest_max_insns - 1; + + if (VG_(clo_vex_control).guest_chase_thresh < 0) + VG_(clo_vex_control).guest_chase_thresh = 0; + + /* Check various option values */ if (VG_(clo_verbosity) < 0) VG_(clo_verbosity) = 0;