Bug #75881 [NEW]: zend_hash_find_bucket() could not find existing hash entry

From: Date: Mon, 29 Jan 2018 00:43:05 +0000
Subject: Bug #75881 [NEW]: zend_hash_find_bucket() could not find existing hash entry
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213727@lists.php.net to get a copy of this message
From: tianfang dot yang at oracle dot com Operating system: linux PHP version: master-Git-2018-01-29 (Git) Package: Strings related Bug Type: Bug Bug description:zend_hash_find_bucket() could not find existing hash entry Description: ------------ OCI8 calls zend_hash_find() to look up existing connection in the hash table. However, with new string compare function zend_string_equal_content(), it failed to match a hash key: static zend_always_inline Bucket *zend_hash_find_bucket(const HashTable *ht, zend_string *key, zend_bool known_hash) { ... while (EXPECTED(idx != HT_INVALID_IDX)) { p = HT_HASH_TO_BUCKET_EX(arData, idx); if (EXPECTED(p->key == key)) { /* check for the same interned string */ return p; } else if (EXPECTED(p->h == h) && EXPECTED(p->key) && EXPECTED(zend_string_equal_content(p->key, key))) { return p; } ... } Revert zend_string_equal_content() to memcmp() resolved the issue. Test script: --------------- Reproducible testcase: ext/oci8/tests/drcp_connection1.phpt -- Edit bug report at https://bugs.php.net/bug.php?id=75881&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75881&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75881&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75881&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75881&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75881&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75881&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75881&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75881&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75881&r=support Expected behavior: https://bugs.php.net/fix.php?id=75881&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75881&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75881&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75881&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75881&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75881&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75881&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75881&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75881&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75881&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75881&r=mysqlcfg

« previous php.bugs (#213727) next »