[php-src] PR #13807: Add next handler parameter to zend_observer_remove_begin/end_handler

From: Date: Mon, 25 Mar 2024 22:41:56 +0000
Subject: [php-src] PR #13807: Add next handler parameter to zend_observer_remove_begin/end_handler
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-25543@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/13807 Author: bwoebi The usage of the current API within an observer handler leads to bugs like https://bugs.xdebug.org/view.php?id=2232. Given two observer handlers, next to each other. The first one is executed. It removes itself. The second observer handler gets moved to the place of the first. The first one returns. The handler in the second slot is fetched, but is now NULL, because the it's now in the slot of the first observer; i.e. the second handler is skipped and the begin/end symmetry guarantee is violated. Providing the next handler to the caller is a zero-cost way to avoid any impact in the paths of zend_observe_fcall_begin/end. --- I could not think of a both inexpensive and better way to implement this...

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