From: felipe
Operating system:
PHP version: Irrelevant
Package: SPL related
Bug Type: Bug
Bug description:Crash when cloning an object wich inherits SplFixedArray
Description:
------------
See below.
Test script:
---------------
<?php
class foo extends SplFixedArray {
public function __construct() { }
}
$x = new foo;
try {
$z = clone $x;
} catch (Exception $e) {
var_dump($e->getMessage());
}
Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
0x082fc564 in spl_fixedarray_object_new_ex (class_type=0xb6a06f74,
obj=0xbfffbf08, orig=0xb6a05964, clone_orig=1, tsrm_ls=0x8942050)
at /home/felipe/dev/php-src/ext/spl/spl_fixedarray.c:228
228 spl_fixedarray_init(intern->array, other->array->size
TSRMLS_CC);
(gdb) p other->array
$6 = (spl_fixedarray *) 0x0
--
Edit bug report at https://bugs.php.net/bug.php?id=62904&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62904&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62904&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=62904&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62904&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=62904&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62904&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=62904&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=62904&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=62904&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=62904&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=62904&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=62904&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=62904&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62904&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=62904&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=62904&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=62904&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=62904&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=62904&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=62904&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=62904&r=mysqlcfg