Hi!

> I don't see the crash. Integer keys are supported in exactly the same
> way as it was in PHP-5.

I see the crash on this test:

https://github.com/smalyshev/php-src/blob/master/ext/spl/tests/bug70155.phpt

I'm not sure how integer keys are supported the same way if I see this
in the code:

https://github.com/php/php-src/blob/master/Zend/zend_API.c#L1248

        ZEND_HASH_FOREACH_STR_KEY_VAL(properties, key, prop) {
                property_info = zend_get_property_info(object->ce, key, 1);

The loop doesn't even consider the possibility of key being NULL (which
happens with integer key) and only considers string keys, and, if the
key is integer, zend_get_property_info gets null as key argument and
segfaults.

-- 
Stas Malyshev
smalys...@gmail.com

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to