diff options
author | Anatol Belski <ab@php.net> | 2017-07-11 16:34:45 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2017-07-11 17:01:59 +0200 |
commit | 8a287c0ea0c437c32f30bfc6a411b967c4b8aafb (patch) | |
tree | b02221447e7ffcd5df69e87751b24a8ce40c9a60 /run-tests.php | |
parent | 9bcd93201f1679646011040093752a48992c0c6b (diff) | |
download | php-git-8a287c0ea0c437c32f30bfc6a411b967c4b8aafb.tar.gz |
Upgrade bundled PCRE to 8.41
HEADSUP! With PCRE 8.39 the JIT related code was changed in the way,
that additional valgrind options became almost unavoidable. Valgrind
had it already sometimes hard with JIT, now there are seem to be more
cases requiring special valgrind options.
For this reason, the new configure option --with-pcre-valgrind was
introduced. The option is development/debugging only and turns on the
Valgrind related pieces in PCRE, so then false positives are avoided
to the big part. In addition, run-tests.php was added a new valgrind
option, when the leak check is enabled and the test filepath contains
pcre.
Thus, to debug the code related to PCRE with JIT enabled, two things
would likely make sense
- configure --with-pcre-valgrind
- valgrind option --smc-check=all if run-tests.php is not used
The checks so far reveal no new issues.
Diffstat (limited to 'run-tests.php')
-rwxr-xr-x | run-tests.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/run-tests.php b/run-tests.php index 93d8722063..8cdaa03b20 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1915,14 +1915,19 @@ TEST $file $env['USE_ZEND_ALLOC'] = '0'; $env['ZEND_DONT_UNLOAD_MODULES'] = 1; + $valgrind_cmd = "valgrind -q --tool=memcheck --trace-children=yes"; + if (strpos($test_file, "pcre") !== false) { + $valgrind_cmd .= " --smc-check=all"; + } + /* --vex-iropt-register-updates=allregs-at-mem-access is necessary for phpdbg watchpoint tests */ 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"; + $cmd = "$valgrind_cmd --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"; + $cmd = "$valgrind_cmd --vex-iropt-precise-memory-exns=yes --log-file=$memcheck_filename $cmd"; } else { - $cmd = "valgrind -q --tool=memcheck --trace-children=yes --vex-iropt-precise-memory-exns=yes --log-file-exactly=$memcheck_filename $cmd"; + $cmd = "$valgrind_cmd --vex-iropt-precise-memory-exns=yes --log-file-exactly=$memcheck_filename $cmd"; } } else { |