#32647 [Asn->Csd]: Using register_shutdown_function() with invalid callback can crash PHP
| From: | sniper@php.net | Date: | Thu, 21 Apr 2005 15:03:01 +0000 |
| Subject: | #32647 [Asn->Csd]: Using register_shutdown_function() with invalid callback can crash PHP | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-77995@lists.php.net to get a copy of this message | ||
ID: 32647
Updated by: sniper@php.net
-Summary: Register_shutdown_function can crash PHP
Reported By: interghost at crovortex dot com
-Status: Assigned
+Status: Closed
Bug Type: Reproducible crash
Operating System: *
PHP Version: 4.*, 5.*
Assigned To: sniper
New Comment:
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.
Previous Comments:
------------------------------------------------------------------------
[2005-04-09 21:05:43] interghost at crovortex dot com
Description:
------------
When calling register_shutdown_function with an array argument in which
the first index is an unset variable or if the first index is numeric 0
and the second any string variable apache2 crashes...I've tested it on
Apache v2.0.52 and v2.0.53.
In the server's error log it says:
[Sat Apr 09 20:37:19 2005] [notice] Parent: child process exited with
status 3221225477 -- Restarting.
[Sat Apr 09 20:37:19 2005] [notice] Apache/2.0.53 (Win32) PHP/5.0.4
configured -- resuming normal operations
[Sat Apr 09 20:37:19 2005] [notice] Server built: Feb 10 2005 06:11:34
[Sat Apr 09 20:37:19 2005] [notice] Parent: Created child process 3900
[Sat Apr 09 20:37:19 2005] [notice] Child 3900: Child process is
running
[Sat Apr 09 20:37:19 2005] [notice] Child 3900: Acquired the start
mutex.
[Sat Apr 09 20:37:19 2005] [notice] Child 3900: Starting 250 worker
threads.
Reproduce code:
---------------
unset($obj);
register_shutdown_function(array($obj,""));
register_shutdown_function(array($obj,"some string"));
register_shutdown_function(array(0,""));
register_shutdown_function(array(0,"some string"));
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=32647&edit=1