php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11474 list delete api always tries to delete from regular list instead of given list
Submitted: 2001-06-13 16:50 UTC Modified: 2001-06-14 00:50 UTC
From: kpatel at mahinetworks dot com Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 4.0.4 OS: Linux
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kpatel at mahinetworks dot com
New email:
PHP Version: OS:

 

 [2001-06-13 16:50 UTC] kpatel at mahinetworks dot com
static inline int zend_list_do_delete(HashTable *list,int id)
{
	zend_rsrc_list_entry *le;
	ELS_FETCH();
	
	if (zend_hash_index_find(&EG(regular_list), id, (void **) &le)==SUCCESS) {
/*		printf("del(%d): %d->%d\n", id, le->refcount, le->refcount-1); */
		if (--le->refcount<=0) {
			return zend_hash_index_del(&EG(regular_list), id);
		} else {
			return SUCCESS;
		}
	} else {
		return FAILURE;
	}
}


In the above function from zend_list.c, as you can see that it is passed a HashTable *list parameter to delete the entry from, but when it calls the hash find and delete functions, it DOES NOT use the parameters HashTable * list which is passed in.  Instead it passes &EG(regular_list), so even if call zend_plist_delete(...) to try to delete something from the persistent list, it'll try to delete it from the regular list.

NOTE: I checked the 4.0.5 release and it has the same problem.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-14 00:50 UTC] sniper@php.net
This function doesn't exist anymore in PHP 4.0.6RC3 or in the latest CVS.

--Jani

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 03:01:27 2024 UTC