I submitted the patch for checking free_storage != NULL.
Marcus, will have to look into SPL and see if dtor is more suitable than free_storage.


Andi

At 11:39 AM 2/8/2004 -0500, Rob Richards wrote:
It appears that the zend iterators need to go back to using the dtor
callback rather than free storage.
throwing an unhandled exception in any of the iterator foreach loops in SPL,
SXE and DOM results in a segfault due to improper cleanup.

To reproduce, put a throw new exception within one of the foreach calls in
limititerator or array_iterator from the SPL tests.

Registering dtor instead of a free storage callback in zend_iterator_wrap
seems to let the iterator objects cleanup properly.
Also in zend_objects_store_del_ref, free_storage is never tested so if an
object doesn't implement this, it causes a segfault.

Patch attached.

Rob

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

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



Reply via email to