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

Valgrind Report for ext/spl/tests/iterator_052.phpt ('SPL: RegexIterator::ALL_MATCHES')

Script

1: <?php
2:
3:
class MyRegexIterator extends RegexIterator
4:
{
5:     public 
$uk$re;
6:     
7:     function 
__construct($it$re$mode$flags 0)
8:     {
9:         
$this->uk $flags self::USE_KEY;
10:         
$this->re $re;
11:         
parent::__construct($it$re$mode$flags);
12:     }
13:
14:     function 
show()
15:     {
16:         foreach(
$this as $k => $v)
17:         {
18:             
var_dump($k);
19:             
var_dump($v);
20:         }
21:     }
22:     
23:     function 
accept()
24:     {
25:         @
preg_match_all($this->re, (string)($this->uk $this->key() : $this->current()), $sub);
26:         
$ret parent::accept();
27:         
var_dump($sub == $this->current());
28:         return 
$ret;
29:     }
30: }
31:
32:
$ar = new ArrayIterator(array('1','1,2','1,2,3','',NULL,array(),'FooBar',',',',,'));
33:
$it = new MyRegexIterator($ar'/(\d),(\d)/'RegexIterator::ALL_MATCHES);
34:
$it->show();
35:
36:
$it = new MyRegexIterator($ar'/(\d)/'RegexIterator::ALL_MATCHES);
37:
$it->show();
38:
39:
var_dump($ar);
40:
41:
?>
42:
===DONE===
43:

Report

==31567== Conditional jump or move depends on uninitialised value(s)
==31567==    at 0x41310AD: ???
==31567==    by 0x14F2F1EA: ???
==31567==    by 0x14F2F1E7: ???
==31567==    by 0x14F2F1EC: ???
==31567==    by 0x1FFEFFB1DF: ???
==31567==    by 0x1405: ???
==31567== 
==31567== Conditional jump or move depends on uninitialised value(s)
==31567==    at 0x41310AD: ???
==31567==    by 0x14F3DBB7: ???
==31567==    by 0x14F3DBB7: ???
==31567==    by 0x14F3DBBC: ???
==31567==    by 0x1FFEFFB1DF: ???
==31567==    by 0x10DB30D: _zend_new_array (zend_hash.c:195)
==31567== 
==31567== Conditional jump or move depends on uninitialised value(s)
==31567==    at 0x41310AD: ???
==31567==    by 0x14F2F307: ???
==31567==    by 0x14F2F307: ???
==31567==    by 0x14F2F30D: ???
==31567==    by 0x1FFEFFB1DF: ???
==31567==    by 0x10DB30D: _zend_new_array (zend_hash.c:195)
==31567== 

 

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

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