From: Operating system: CentOS release 4.8 PHP version: 5.3.3 Package: Scripting Engine problem Bug Type: Bug Bug description:Segfault using parent::_construct
Description:
------------
When calling parent::__construct using call_user_func_array, a segfault
occurs.
Script to reproduce attached below.
This worked in 5.2.14.
Expected: instantiation of class
Actual: segfault
Notes: Only occurs with multiple nesting levels. A single level doesn't
cause
this.
Test script:
---------------
<?
class baseA{
function foo(){
return 'bar';
}
function __construct(){
foo();
}
}
class baseB extends baseA {
function __construct(){
$args = func_get_args();
call_user_func_array(array($this, 'parent::__construct'), $args);
}
}
class demo extends baseB{
function __construct(){
$args = func_get_args();
call_user_func_array(array($this, 'parent::__construct'), $args);
}
}
$z = new demo('d');
?>
Expected result:
----------------
instantiation of class
Actual result:
--------------
segfault.
--
Edit bug report at http://bugs.php.net/bug.php?id=52928&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=52928&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=52928&r=trysnapshot53
Try a snapshot (trunk):
http://bugs.php.net/fix.php?id=52928&r=trysnapshottrunk
Fixed in SVN:
http://bugs.php.net/fix.php?id=52928&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=52928&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=52928&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=52928&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=52928&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=52928&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=52928&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=52928&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=52928&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=52928&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=52928&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52928&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52928&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=52928&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=52928&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=52928&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=52928&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=52928&r=mysqlcfg
