[php-src] PR #24426: Fix fiber switch corrupting user comparator globals in sort functions

From: Date: Mon, 19 Oct 2026 11:47:40 +0000
Subject: [php-src] PR #24426: Fix fiber switch corrupting user comparator globals in sort functions
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-39587@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/24426 Author: lacatoire usort(), uasort(), uksort(), array_multisort() and the user-callback array_diff()/array_intersect() variants save and restore a request-global comparator in LIFO order. A comparator that suspends a Fiber lets another fiber's sort overwrite it, so the restore writes back a stale pointer (wrong comparator, or a segfault in array_multisort()). Block fiber switching while the global is live. Suspending from the comparator now throws a FiberError.

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