|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48023 Anonymous function segfaults when used in spl_autoload_register
Submitted: 2009-04-20 08:18 UTC Modified: 2009-04-20 14:20 UTC
From: bugs dot php dot net at moesen dot nu Assigned: colder (profile)
Status: Closed Package: SPL related
PHP Version: 5.3CVS-2009-04-20 OS: Linux 2.6
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: bugs dot php dot net at moesen dot nu
New email:
PHP Version: OS:


 [2009-04-20 08:18 UTC] bugs dot php dot net at moesen dot nu
Bug #46204 was incorrectly marked as BOGUS. Please reopen it.

Reproduce code:
spl_autoload_register($x = function () { });

Does not segfault:
spl_autoload_register(function () { });


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-20 08:20 UTC]
Please try using this CVS snapshot:
For Windows:

 [2009-04-20 09:06 UTC] bugs dot php dot net at moesen dot nu
$ ./php -r  'spl_autoload_register(function () { }); new Foo();'
Segmentation fault

$ ./php -r  'spl_autoload_register($x = function () { }); new Foo();'

Fatal error: Class 'Foo' not found in Command line code on line 1

$ ./php --version
PHP 5.3.0RC2-dev (cli) (built: Apr 20 2009 11:04:24)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2009 Zend Technologies
 [2009-04-20 14:20 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Tue Feb 07 19:05:51 2023 UTC