php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #3944 module shutdown runs before calling registered list destructors
Submitted: 2000-03-28 10:12 UTC Modified: 2000-07-04 10:46 UTC
From: tom dot anheyer at berlinonlin dot de Assigned:
Status: Closed Package: Dynamic loading
PHP Version: 4.0 Beta 4 Release Candidate 2 OS: Linux 2.2.14/Apache 1.3.11
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tom dot anheyer at berlinonlin dot de
New email:
PHP Version: OS:

 

 [2000-03-28 10:12 UTC] tom dot anheyer at berlinonlin dot de
while using modules loaded with dl() I notice that the module shutdown runs before calling any registered list destructors. The module shutdown removes the destructor buckets from the destructors list.

This results in the error log:

Unknown list entry type in request shutdown (19) in Unknown on line 0

The list destructor is not called. The Code works in the former PHP3 Module and I can't see a major
difference to the code in ext/standard/dir.c.

Here is the code:

static int le_http;

static void http_destructor(php_http_request *preq)
{
...
}

PHP_MINIT_FUNCTION(http_init)
{
...
le_http = register_list_destructors(http_destructor,NULL);
...
}

DLEXPORT PHP_FUNCTION(http)
{
php_http_request *preq;
int handle;
...
preq = ...
handle = zend_list_insert(preq, le_http);

object_init_ex (return_value, http_class_entry_ptr);
add_property_resource (return_value, "handle", handle);
}



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-05-10 09:34 UTC] tom dot anheyer at berlinonlin dot de
The bug is still alive in RC2.
A little update to the description:
The destructor is called if the resource is allocated
in a function but not if the resource is global.
 [2000-06-11 19:19 UTC] zeev at cvs dot php dot net
This bug should be gone in the latest CVS (scheduled for 4.0.1).   If you can check it - please confirm.
Thanks!
 [2000-07-04 10:46 UTC] stas at cvs dot php dot net
closed by user request
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu Jul 03 16:01:36 2025 UTC