php-src/ext/xmlreader
Niels Dossche ce8ab5f16a
Fix GH-17736: Assertion failure zend_reference_destroy()
The cache slot for FETCH_OBJ_W in function `test` is primed with the
class for C. The next call uses a simplexml instance and reuses the same
cache slot. simplexml's get_property_ptr handler does not use the cache
slot, so the old values remain in the cache slot. When
`zend_handle_fetch_obj_flags` is called this is not guarded by a check
for the class entry. So we end up using the prop_info from the property
C::$a instead of the simplexml property.

This patch adds a reset to the cache slots in the property address fetch
code and also in the extensions with a non-standard reference handler.
This keeps the run time cache consistent and avoids the issue without
complicating the fast paths.

Closes GH-17739.
2025-03-02 22:33:32 +01:00
..
tests Fix GH-16292: Segmentation fault in ext/xmlreader/php_xmlreader.c:1282 2024-10-08 20:54:07 +02:00
config.m4
config.w32
CREDITS
php_xmlreader.c Fix GH-17736: Assertion failure zend_reference_destroy() 2025-03-02 22:33:32 +01:00
php_xmlreader.h Declare ext/xmlreader constants in stubs (#9133) 2022-07-26 05:57:11 +02:00
php_xmlreader.stub.php Narrow some more return types to true 2023-05-10 19:08:15 +02:00
php_xmlreader_arginfo.h Revert "Merge branch 'PHP-8.2'" 2023-07-04 09:18:49 +02:00