|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-09-30 17:48 UTC] north at sublink dot ca
Description:
------------
Using an lambda function as the argument to spl_autoload_register causes a segfault.
When storing the lambda function in a variable though, it works fine:
<?php
$l = function($name){};
spl_autoload_register($l);
new O();
?>
Using a default install.
Reproduce code:
---------------
<?php
spl_autoload_register(function($name){});
new O();
?>
Expected result:
----------------
Fatal error: Class 'O' not found
Actual result:
--------------
Segmentation fault.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 22:00:02 2025 UTC |
I've tried using the latest snapshot of 5.3 (php5.3-200810012230) PHP 5.3.0alpha3-dev (cli) (built: Oct 1 2008 16:52:06) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2008 Zend Technologies This still causes a segfault: php -r 'spl_autoload_register(function($n){});new T();' I`m running Ubuntu 8.04.1 inside of VirtualBox 2.0.2 Let me know if there is any other information that would be helpful.I've tried the 2009-01-14 snapshot on linux again, and the code is still causing a segmentation fault. Just to be clear: it segfaults in linux, but not in windows. Here is the code again to reproduce the bug: # php -r 'spl_autoload_register(function($n){});new T();' Segmentation fault And the php version: # php -v PHP 5.3.0alpha4-dev (cli) (built: Jan 14 2009 01:06:21) I'm not sure this should be marked as Bogus.