Req #43525 [Opn->Fbk]: [PATCH] zend_list functions should take ulong IDs

From: Date: Tue, 16 Dec 2014 23:34:41 +0000
Subject: Req #43525 [Opn->Fbk]: [PATCH] zend_list functions should take ulong IDs
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189091@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=43525&edit=1 ID: 43525 Updated by: kalle@php.net Reported by: mi+php at aldan dot algebra dot com Summary: [PATCH] zend_list functions should take ulong IDs -Status: Open +Status: Feedback Type: Feature/Change Request Package: Scripting Engine problem Operating System: FreeBSD/amd64 PHP Version: 5.2.5 Block user comment: N Private report: N New Comment: Please try using this snapshot: http://snaps.php.net/php-trunk-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Please try a PHP7 snapshot (master) Previous Comments: ------------------------------------------------------------------------ [2008-01-29 15:00:34] mi+php at aldan dot algebra dot com The original problem may, indeed, be a problem with PostgreSQL back-end, but the dropping of bits by the list-API is gratuitous. There is no need for it to truncate to int, because internally it stores ulong values anyway... It may make sense to keep the 5_2 branch binary-compatible (even though the compatibility would only be broken on 64-bit platforms), but going forward the API should change... Come to think of it, I am not sure, the ABI would break even on 64-bit platforms, as you'd be widening (rather than narrowing) the acceptable values. ------------------------------------------------------------------------ [2008-01-29 10:13:33] dmitry@php.net 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. ------------------------------------------------------------------------ [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 https://bugs.php.net/bug.php?id=43525&edit=1

« previous php.bugs (#189091) next »