[php-src] PR #20850: Fix block_pass JMP[N]Z optimization

From: Date: Tue, 06 Jan 2026 16:07:00 +0000
Subject: [php-src] PR #20850: Fix block_pass JMP[N]Z optimization
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34465@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/20850 Author: iluuu1994 In the following optimization: ``` JMPZ(X,L1) JMP(L2) L1: -> JMPNZ(X,L2) NOP ``` L1 must not be followed by another block, so that it may safely be followed by the block containing the JMPNZ. get_next_block() is used to verify L1 is the direct follower. This function also skips empty blocks, including live, empty target blocks, which will then implicitly follow the new follow block. This will result in L1 being followed by two separate blocks, which is not possible. Resolve this by get_next_block() stopping at target blocks. Fixes OSS-Fuzz #472563272

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