php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #4750 When storing resource objects in static variables, PHP goes into a deadly loop.
Submitted: 2000-06-01 12:26 UTC Modified: 2000-06-05 15:49 UTC
From: php at raylucke dot com Assigned:
Status: Closed Package: Reproducible Crash
PHP Version: 4.0.0 Release OS: Linux
Private report: No CVE-ID: None
 [2000-06-01 12:26 UTC] php at raylucke dot com
The faulty code is below.

This is a VERY bad bug. It will cause Apache / PHP to eat CPU cycles and put in the log the following line continuously:<br>
Fatal error  ht=40310d44 is already destroyed in zend_hash.c:519 in Unknown on line 0<br>

This is not a dir() bug. It happens any time you try to store a resource object (such as dir(), mysql_query(), etc.) in a static variable.<br><br>

&lt;?
static $t = 0;
$t = dir(".");
?&gt;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-06-05 15:49 UTC] stas at cvs dot php dot net
Fixed in CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 16 09:01:28 2024 UTC