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

Valgrind Report for ext/mbstring/tests/mb_chr_ord.phpt ('mb_chr() and mb_ord()')

Script

1: <?php
2: ini_set
('internal_encoding''utf-8');
3: for(
$ch 1$ch 80000$ch++) {
4:     
$str mb_chr($ch);
5:     if (
false === $str) {
6:         echo 
"ERROR($ch)\n";
7:         continue;
8:     }
9:     if (
$ch != mb_ord($str)) {
10:         echo 
"REAL ERROR($ch)\n";
11:     }
12: }
13: echo 
'OK';
14:

Report

==32630== Invalid read of size 8
==32630==    at 0xA36940: php_mb_ord (mbstring.c:4920)
==32630==    by 0xA37170: zif_mb_ord (mbstring.c:4947)
==32630==    by 0x1199C8A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==32630==    by 0x131518D: execute_ex (zend_vm_execute.h:59663)
==32630==    by 0x1315805: zend_execute (zend_vm_execute.h:63700)
==32630==    by 0x10BAC6B: zend_execute_scripts (zend.c:1494)
==32630==    by 0xFAC08D: php_execute_script (main.c:2593)
==32630==    by 0x131B3A1: do_cli (php_cli.c:1011)
==32630==    by 0x131CD55: main (php_cli.c:1404)
==32630==  Address 0x14f2fbd0 is 96 bytes inside a block of size 112 free'd
==32630==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==32630==    by 0x10519A4: _efree (zend_alloc.c:2428)
==32630==    by 0xA1DE00: _php_mb_allocators_free (mbstring.c:674)
==32630==    by 0xA1AD06: mbfl_convert_filter_delete (mbfl_convert.c:231)
==32630==    by 0xA3690E: php_mb_ord (mbstring.c:4918)
==32630==    by 0xA37170: zif_mb_ord (mbstring.c:4947)
==32630==    by 0x1199C8A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==32630==    by 0x131518D: execute_ex (zend_vm_execute.h:59663)
==32630==    by 0x1315805: zend_execute (zend_vm_execute.h:63700)
==32630==    by 0x10BAC6B: zend_execute_scripts (zend.c:1494)
==32630==    by 0xFAC08D: php_execute_script (main.c:2593)
==32630==    by 0x131B3A1: do_cli (php_cli.c:1011)
==32630==  Block was alloc'd at
==32630==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==32630==    by 0x1052F6B: __zend_malloc (zend_alloc.c:2811)
==32630==    by 0x1051681: _emalloc (zend_alloc.c:2413)
==32630==    by 0xA1DD30: _php_mb_allocators_malloc (mbstring.c:659)
==32630==    by 0xA1AA51: mbfl_convert_filter_new (mbfl_convert.c:180)
==32630==    by 0xA36853: php_mb_ord (mbstring.c:4908)
==32630==    by 0xA37170: zif_mb_ord (mbstring.c:4947)
==32630==    by 0x1199C8A: ZEND_DO_ICALL_SPEC_RETVAL_USED_HANDLER (zend_vm_execute.h:617)
==32630==    by 0x131518D: execute_ex (zend_vm_execute.h:59663)
==32630==    by 0x1315805: zend_execute (zend_vm_execute.h:63700)
==32630==    by 0x10BAC6B: zend_execute_scripts (zend.c:1494)
==32630==    by 0xFAC08D: php_execute_script (main.c:2593)
==32630== 

 

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

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