Edit report at https://bugs.php.net/bug.php?id=60216&edit=1
ID: 60216
Comment by: contact at nullivex dot com
Reported by: contact at nullivex dot com
Summary: Use page_files to dynamically define a function name
results in crash
Status: Open
Type: Bug
Package: Reproducible crash
Operating System: debian 6.0.3
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
I will give this a shot.
Maybe it is a problem with debians build. Let me grab a config string.
I narrowed it down.
Its an issue with suoshin. I always forget that debian in their infinite wisdom
has enabled this module by default.
Is the suoshin module part of the PHP project or is there a separate site I
should file this?
Previous Comments:
------------------------------------------------------------------------
[2011-11-04 03:12:14] [email protected]
I can not reproduce this segfault with PHP-5.3-trunk-snap, instead , the script
terminated by run out of memory.
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted ***
could you try with the 5.3-trunk-snap?
------------------------------------------------------------------------
[2011-11-04 03:06:50] contact at nullivex dot com
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 this bug report at https://bugs.php.net/bug.php?id=60216&edit=1