[php-src] PR #16025: Fix assertion failure in generator dtor

From: Date: Tue, 24 Sep 2024 14:22:13 +0000
Subject: [php-src] PR #16025: Fix assertion failure in generator dtor
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-28765@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/16025 Author: arnaud-lb Fixes GH-15866. Related: GH-15158, GH-10462. I don't remember why I assumed that a generator with the ZEND_GENERATOR_IN_FIBER flag (implying the generator is running) could only be dtor during shutdown, but this assumption was wrong. It can happen during GC, of course. Unfortunately it means that we can not cache the result of check_node_running_in_fiber() anymore, so we may traverse the tree more than once. However we only ever call this function when collecting a Fiber, which I expect to be rare. This is already the 3rd follow up of GH-10462, so I considered [this idea](https://github.com/php/php-src/issues/9916#issuecomment-1309566763) again, but since we can start fibers in destructors now, this is not trivial.

« previous php.git-pulls (#28765) next »