]> granicus.if.org Git - php/commit
Remove bogus ZEND_ASSERT(hash != 0)
authorBob Weinand <bobwei9@hotmail.com>
Wed, 18 Mar 2015 21:25:55 +0000 (22:25 +0100)
committerBob Weinand <bobwei9@hotmail.com>
Wed, 18 Mar 2015 21:25:55 +0000 (22:25 +0100)
commitdac2b060e4c55db2f1b309125c9506ecc8f3200e
tree24e282b111cea03831339714a3ede99c9031b44d
parenteb5dfedb6b4742640fc447d5a03dc575d5f569f1
Remove bogus ZEND_ASSERT(hash != 0)
There's always a possibility that the has will end up as equal to zero due to overflowing.
See the tests for strings whose hash overflow.
Yes, there's a check for whether the hash already was calculated... and strings with a hash equal to zero always need the hash recalculated, in one of 2^32 respectively 2^64 cases - which should not be a major issue.
Zend/tests/array_hash_zero.phpt [new file with mode: 0644]
Zend/zend_string.h