[php-src] PR #25836: Zend: Reset extended_value of FREE synthesized by DCE
| From: | iliaal | Date: | Fri, 27 Nov 2026 13:08:08 +0000 |
| Subject: | [php-src] PR #25836: Zend: Reset extended_value of FREE synthesized by DCE | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-41115@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25836
Author: iliaal
If a destructor run by a FREE that DCE synthesized throws,
cleanup_live_vars() frees
the operand a second time. DCE turns a dead instruction whose operand still needs freeing into a
FREE but keeps the old extended_value. After a (float) or
(array) cast or empty(), that value has bit 0 set, which
ZEND_HANDLE_EXCEPTION reads as ZEND_FREE_ON_RETURN. The test pins opcache.jit=disable
because function JIT has a separate destructor-timing bug in the same code, caused by
result_may_be_separated().