php.net |  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
 [2009-04-20 08:18 UTC] bugs dot php dot net at moesen dot nu
Description:
------------
Bug #46204 was incorrectly marked as BOGUS. Please reopen it.

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

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



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-04-20 08:20 UTC] pajoye@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.3-latest.tar.gz
 
For Windows:

  http://windows.php.net/snapshots/


 [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] colder@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Mon Aug 10 17:01:25 2020 UTC