]> granicus.if.org Git - php/commitdiff
Use --vex-iropt-precise-memory-exns=yes for valgrind < 3.8.0
authorBob Weinand <bobwei9@hotmail.com>
Tue, 10 Nov 2015 08:27:32 +0000 (09:27 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Tue, 10 Nov 2015 08:27:49 +0000 (09:27 +0100)
run-tests.php

index f3d4a27b156d678fe9496608f1d9cc22489cdd46..a607f1cda2b3fa1a2e97d752e3119b10a2dded41 100755 (executable)
@@ -1877,11 +1877,13 @@ TEST $file
                $env['ZEND_DONT_UNLOAD_MODULES'] = 1;
 
                /* --vex-iropt-register-updates=allregs-at-mem-access is necessary for phpdbg watchpoint tests */
-               if (version_compare($valgrind_version, '3.3.0', '>=')) {
+               if (version_compare($valgrind_version, '3.8.0', '>=')) {
                        /* valgrind 3.3.0+ doesn't have --log-file-exactly option */
                        $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access --log-file=$memcheck_filename $cmd";
+               } elseif (version_compare($valgrind_version, '3.3.0', '>=')) {
+                       $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file=$memcheck_filename $cmd";
                } else {
-                       $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-register-updates=allregs-at-mem-access --log-file-exactly=$memcheck_filename $cmd";
+                       $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file-exactly=$memcheck_filename $cmd";
                }
 
        } else {