PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/pcre/tests/bug44214.phpt ('Bug #44214 (crash with preg_replace_callback() and global variable)')

Script

1: <?php
2: $string 
'aaa bbb ccc ddd eee ccc aaa bbb';
3:
4:
$array = array();
5:
6: function 
myCallBack$match ) {
7:     global 
$array;
8:     
$array[] = $match;
9:     return 
'xxx';
10: }
11:
12:
var_dump(preg_replace_callback'`a+`''myCallBack'$string));
13:
var_dump($array);
14:
?>
15:

Report

==11802== Conditional jump or move depends on uninitialised value(s)
==11802==    at 0x413108D: ???
==11802==    by 0x14F2DD12: ???
==11802==    by 0x14F2DCF7: ???
==11802==    by 0x14F2DD16: ???
==11802==    by 0x1FFEFFBB9F: ???
==11802==    by 0x45348F: ??? (in /var/php_gcov/PHP_HEAD/sapi/cli/php)
==11802== 

 

Generated at Sun, 24 Sep 2017 15:32:56 +0000 (39 hours ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.