From:
Operating system: debian 6.0.3
PHP version: 5.3.8
Package: Reproducible crash
Bug Type: Bug
Bug description:Use page_files to dynamically define a function name results in
crash
Description:
------------
Please note this started out as circular reference error which is my
mistake. But, PHP should handle this more gracefully.
root@dev:/opt/magic# php -v
PHP 5.3.3-7+squeeze3 with Suhosin-Patch (cli) (built: Jun 28 2011
08:24:40)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with Suhosin v0.9.32.1, Copyright (c) 2007-2010, by SektionEins GmbH
root@dev:/opt/magic# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 6.0.3 (squeeze)
Release: 6.0.3
Codename: squeeze
here is my output
root@dev:/opt/magic# php test.php
Segmentation fault
here is the log files
Nov 3 20:02:37 dev kernel: [2586752.054908] php[2127]: segfault at
7fff90037fe8 ip 00000000006a38e0 sp 00007fff90038018 error 6 in
php5[400000+6f9000]
Test script:
---------------
<?php
class Test {
static $urls = array(
'page_files'
);
public static function _all(){
$urls = array();
foreach(self::$urls as $func) $urls['url_'.$func] =
self::$func();
return $urls;
}
public static function page_files(){
return self::page_files().'&do=files';
}
}
Test::_all();
Expected result:
----------------
E_FATAL describing a circular reference.
Actual result:
--------------
Nov 3 20:02:37 dev kernel: [2586752.054908] php[2127]: segfault at
7fff90037fe8 ip 00000000006a38e0 sp 00007fff90038018 error 6 in
php5[400000+6f9000]
--
Edit bug report at https://bugs.php.net/bug.php?id=60216&edit=1
--
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=60216&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=60216&r=trysnapshot53
Try a snapshot (trunk):
https://bugs.php.net/fix.php?id=60216&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=60216&r=fixed
Fixed in SVN and need be documented:
https://bugs.php.net/fix.php?id=60216&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=60216&r=alreadyfixed
Need backtrace:
https://bugs.php.net/fix.php?id=60216&r=needtrace
Need Reproduce Script:
https://bugs.php.net/fix.php?id=60216&r=needscript
Try newer version:
https://bugs.php.net/fix.php?id=60216&r=oldversion
Not developer issue:
https://bugs.php.net/fix.php?id=60216&r=support
Expected behavior:
https://bugs.php.net/fix.php?id=60216&r=notwrong
Not enough info:
https://bugs.php.net/fix.php?id=60216&r=notenoughinfo
Submitted twice:
https://bugs.php.net/fix.php?id=60216&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=60216&r=globals
PHP 4 support discontinued:
https://bugs.php.net/fix.php?id=60216&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=60216&r=dst
IIS Stability:
https://bugs.php.net/fix.php?id=60216&r=isapi
Install GNU Sed:
https://bugs.php.net/fix.php?id=60216&r=gnused
Floating point limitations:
https://bugs.php.net/fix.php?id=60216&r=float
No Zend Extensions:
https://bugs.php.net/fix.php?id=60216&r=nozend
MySQL Configuration Error:
https://bugs.php.net/fix.php?id=60216&r=mysqlcfg