Bug #69420 [NEW]: Invalid read in zend_std_get_method
| From: | laruence@php.net | Date: | Fri, 10 Apr 2015 14:50:30 +0000 |
| Subject: | Bug #69420 [NEW]: Invalid read in zend_std_get_method | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-191936@lists.php.net to get a copy of this message | ||
From: laruence
Operating system:
PHP version: 5.5.23
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Invalid read in zend_std_get_method
Description:
------------
none
Test script:
---------------
<?php
trait T {
protected function test() {}
}
class A {
protected function test() {
}
}
class B extends A {
use T;
public function foo() {
$this->test();
}
}
$b = new B();
$b->foo();
Expected result:
----------------
nothing with valgrind
Actual result:
--------------
==6262== Invalid read of size 8
==6262== at 0x84CF2B: zend_std_get_method
(zend_object_handlers.c:1103)
==6262== by 0x86C9B4: ZEND_INIT_METHOD_CALL_SPEC_UNUSED_CONST_HANDLER
(zend_vm_execute.h:25480)
==6262== by 0x85D207: execute_ex (zend_vm_execute.h:363)
==6262== by 0x8243DF: zend_execute_scripts (zend.c:1341)
==6262== by 0x7C2121: php_execute_script (main.c:2597)
==6262== by 0x8C83EE: do_cli (php_cli.c:994)
==6262== by 0x4415CF: main (php_cli.c:1378)
==6262== Address 0xf7a3940 is 16 bytes inside a block of size 248
free'd
==6262== at 0x4C2CE8E: realloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6262== by 0x82FB0C: _zend_hash_quick_add_or_update
(zend_hash.c:335)
==6262== by 0x803D49: zend_add_trait_method (zend_compile.c:4088)
==6262== by 0x804477: zend_traits_copy_functions
(zend_compile.c:4187)
==6262== by 0x830A07: zend_hash_apply_with_arguments
(zend_hash.c:701)
==6262== by 0x80754D: zend_do_bind_traits (zend_compile.c:4357)
==6262== by 0x864E33: ZEND_BIND_TRAITS_SPEC_HANDLER
(zend_vm_execute.h:1163)
==6262== by 0x85D207: execute_ex (zend_vm_execute.h:363)
==6262== by 0x8243DF: zend_execute_scripts (zend.c:1341)
==6262== by 0x7C2121: php_execute_script (main.c:2597)
==6262== by 0x8C83EE: do_cli (php_cli.c:994)
==6262== by 0x4415CF: main (php_cli.c:1378)
==6262==
--
Edit bug report at https://bugs.php.net/bug.php?id=69420&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69420&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69420&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69420&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69420&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69420&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69420&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69420&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69420&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69420&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69420&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69420&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69420&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69420&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69420&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69420&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69420&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69420&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69420&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69420&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69420&r=mysqlcfg