[php-src] PR #25730: Fix segfault with a constant array in optimized array_map()

From: Date: Wed, 25 Nov 2026 07:35:12 +0000
Subject: [php-src] PR #25730: Fix segfault with a constant array in optimized array_map()
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40987@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25730 Author: pawell67 TYPE_ASSERT checks its operand and leaves it alive for a later use, such as the FE_RESET_R of the loop emitted for array_map() by zend_compile_func_array_map(). When the operand was found to be constant, pass 1 and the block pass replaced only the TYPE_ASSERT operand and removed its definition, leaving the later use without one: a segfault with opcache, and an SSA integrity failure in debug builds, e.g. for array_map(strlen(...), constant('PHP_EOL') ? ['a', 'bb'] : 1) Keep looking for later uses after replacing the operand of TYPE_ASSERT.

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