#43525 [Asn->Opn]: zend_list functions should take ulong IDs
ID: 43525
Updated by: dmitry@php.net
Reported By: mi+php at aldan dot algebra dot com
-Status: Assigned
+Status: Open
-Bug Type: Compile Warning
+Bug Type: PostgreSQL related
Operating System: FreeBSD/amd64
PHP Version: 5.2.5
Assigned To: dmitry
New Comment:
The fact that ext/pgsql uses ZE API in wrong way, doesn't mean that we
should fix the API. It is especially impossible in PHP_5_2 branch,
because it'll break binary compatibility.
I would suggest fix the bug in ext/pgsql by using other data
structures.
Previous Comments:
------------------------------------------------------------------------
[2007-12-07 05:13:38] mi+php at aldan dot algebra dot com
Description:
------------
The "id" variable in the zend_list family of functions should be ulong
(or uintptr_t, as pointers are often stored there). It already is ulong
in the underlying "workhorse" function zend_hash_index_find.
At least one spot -- in in pgsql.c -- makes an id from a pointer, which
leads to nasty occasional errors and httpd-/crashes/ on 64-bit
platforms.
Please, find the patch on
http://virtual-estates.com/~mi/port-stuff/patch-zend_list
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43525&edit=1
Thread (7 messages)