Skip to content

Commit e5e6ba0

Browse files
committed
Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4: Fix run-tests.php with Valgrind >= 3.10.0. Conflicts: run-tests.php
2 parents d393779 + 5d1bfd6 commit e5e6ba0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

run-tests.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -581,8 +581,8 @@ function save_or_mail_results()
581581
if (!$valgrind_header) {
582582
error("Valgrind returned no version info, cannot proceed.\nPlease check if Valgrind is installed.");
583583
} else {
584-
$valgrind_version = preg_replace("/valgrind-(\d)\.(\d)\.(\d+)([.\w_-]+)?(\s+)/", '$1$2$3', $valgrind_header, 1, $replace_count);
585-
if ($replace_count != 1 || !is_numeric($valgrind_version)) {
584+
$valgrind_version = preg_replace("/valgrind-(\d+)\.(\d+)\.(\d+)([.\w_-]+)?(\s+)/", '$1.$2.$3', $valgrind_header, 1, $replace_count);
585+
if ($replace_count != 1) {
586586
error("Valgrind returned invalid version info (\"$valgrind_header\"), cannot proceed.");
587587
}
588588
$valgrind_header = trim($valgrind_header);
@@ -1780,7 +1780,7 @@ function run_test($php, $file, $env)
17801780
$env['USE_ZEND_ALLOC'] = '0';
17811781
$env['ZEND_DONT_UNLOAD_MODULES'] = 1;
17821782

1783-
if ($valgrind_version >= 330) {
1783+
if (version_compare($valgrind_version, '3.3.0', '>=')) {
17841784
/* valgrind 3.3.0+ doesn't have --log-file-exactly option */
17851785
$cmd = "valgrind -q --tool=memcheck --trace-children=yes --log-file=$memcheck_filename $cmd";
17861786
} else {

0 commit comments

Comments
 (0)