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_2.phpt ('Bug #44214-2 (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[0];
9:     return 
'xxx';
10: }
11:
12:
var_dump(preg_replace_callback'`a+`''myCallBack'$string));
13:
var_dump($array);
14:
?>
15:

Report

==29072== Conditional jump or move depends on uninitialised value(s)
==29072==    at 0x413108D: ???
==29072==    by 0x14F2B262: ???
==29072==    by 0x14F2B247: ???
==29072==    by 0x14F2B266: ???
==29072==    by 0x1FFEFFBBAF: ???
==29072==    by 0x4540FF: ??? (in /var/php_gcov/PHP_HEAD/sapi/cli/php)
==29072== 

 

Generated at Sat, 09 Sep 2017 03:10:54 +0000 (13 days ago)

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