Bug #60536 [PATCH]: Traits Segfault
| From: | laruence@php.net | Date: | Fri, 16 Dec 2011 15:57:01 +0000 |
| Subject: | Bug #60536 [PATCH]: Traits Segfault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-165910@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60536&edit=1
ID: 60536
Patch added by: laruence@php.net
Reported by: scottmac@php.net
Summary: Traits Segfault
Status: Open
Type: Bug
Package: Scripting Engine problem
Operating System: ubuntu 11.11
PHP Version: 5.4SVN-2011-12-15 (SVN)
Block user comment: N
Private report: N
New Comment:
The following patch has been added/updated:
Patch Name: bug60536.phpt
Revision: 1324051021
URL: https://bugs.php.net/patch-display.php?bug=60536&patch=bug60536.phpt&revision=1324051021
Previous Comments:
------------------------------------------------------------------------
[2011-12-16 15:54:15] laruence@php.net
The following patch has been added/updated:
Patch Name: bug60536.patch
Revision: 1324050855
URL: https://bugs.php.net/patch-display.php?bug=60536&patch=bug60536.patch&revision=1324050855
------------------------------------------------------------------------
[2011-12-15 20:38:27] scottmac@php.net
backtrace:
#0 0x0000000100289c71 in zend_mm_check_ptr (heap=0x101000000, ptr=0x100c4f730,
silent=1, __zend_filename=0x1005476a8 "/Users/macvicar/dev/php-
src/branches/PHP_5_4/Zend/zend_vm_execute.h", __zend_lineno=10833,
__zend_orig_filename=0x1005437a0 "/Users/macvicar/dev/php-
src/branches/PHP_5_4/Zend/zend_execute.h", __zend_orig_lineno=88) at
zend_alloc.c:1380
#1 0x000000010028c1ad in _zend_mm_free_int (heap=0x101000000, p=0x100c4f730,
__zend_filename=0x1005476a8 "/Users/macvicar/dev/php-
src/branches/PHP_5_4/Zend/zend_vm_execute.h", __zend_lineno=10833,
__zend_orig_filename=0x1005437a0 "/Users/macvicar/dev/php-
src/branches/PHP_5_4/Zend/zend_execute.h", __zend_orig_lineno=88) at
zend_alloc.c:2064
#2 0x000000010028de9d in _efree (ptr=0x100c4f730, __zend_filename=0x1005476a8
"/Users/macvicar/dev/php-src/branches/PHP_5_4/Zend/zend_vm_execute.h",
__zend_lineno=10833, __zend_orig_filename=0x1005437a0 "/Users/macvicar/dev/php-
src/branches/PHP_5_4/Zend/zend_execute.h", __zend_orig_lineno=88) at
zend_alloc.c:2436
#3 0x00000001003742c8 in i_zval_ptr_dtor [inlined] () at
/Users/macvicar/dev/php-src/branches/PHP_5_4/Zend/zend_execute.h:88
#4 0x00000001003742c8 in ZEND_RETURN_SPEC_VAR_HANDLER (execute_data=0x1009802f8)
at zend_execute.h:10833
#5 0x000000010032a882 in execute (op_array=0x1009bad50) at zend_vm_execute.h:410
#6 0x00000001002d733b in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at zend.c:1272
#7 0x0000000100219973 in php_execute_script (primary_file=0x7fff5fbff170) at
main.c:2476
------------------------------------------------------------------------
[2011-12-15 20:37:07] scottmac@php.net
Description:
------------
Following code crashes.
Test script:
---------------
<?php
trait T { private $x = 0; }
class X { use T; }
class Y extends X {
use T;
function x() { return ++$this->x; }
}
class Z extends Y {
function z() { return ++$this->x; }
}
$a = new Z();
$a->x();
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=60536&edit=1