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_ord.phpt ('mb_ord()')

Script

1: <?php
2: var_dump
(
3:     
0x20bb7 === mb_ord("\u{20bb7}"),
4:     
false === mb_ord("\u{d800}"),
5:     
0x50aa === mb_ord("\x8f\xa1\xef""EUC-JP-2004")
6: );
7:
8:
// Invalid
9:
var_dump(
10:     
mb_ord("\u{d800}""typo"),
11:     
mb_ord("\u{d800}""pass"),
12:     
mb_ord("\u{d800}""jis"),
13:     
mb_ord("\u{d800}""cp50222"),
14:     
mb_ord("\u{d800}""utf-7"),
15:     
mb_ord("")
16: );
17:
?>
18:

Report

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

 

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

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