Skip to content

Commit ccf8b54

Browse files
committed
Use --vex-iropt-precise-memory-exns=yes for valgrind < 3.8.0
1 parent 3cb3979 commit ccf8b54

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

run-tests.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1877,11 +1877,13 @@ function run_test($php, $file, $env)
18771877
$env['ZEND_DONT_UNLOAD_MODULES'] = 1;
18781878

18791879
/* --vex-iropt-register-updates=allregs-at-mem-access is necessary for phpdbg watchpoint tests */
1880-
if (version_compare($valgrind_version, '3.3.0', '>=')) {
1880+
if (version_compare($valgrind_version, '3.8.0', '>=')) {
18811881
/* valgrind 3.3.0+ doesn't have --log-file-exactly option */
18821882
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access --log-file=$memcheck_filename $cmd";
1883+
} elseif (version_compare($valgrind_version, '3.3.0', '>=')) {
1884+
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file=$memcheck_filename $cmd";
18831885
} else {
1884-
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access --log-file-exactly=$memcheck_filename $cmd";
1886+
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file-exactly=$memcheck_filename $cmd";
18851887
}
18861888

18871889
} else {

0 commit comments

Comments
 (0)