[php-src] master: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Thu, 19 Nov 2026 09:47:50 +0000
Subject: [php-src] master: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143867@lists.php.net to get a copy of this message
Author: Weilin Du (LamentXU123) Date: 2026-11-19T17:42:06+08:00 Commit: https://github.com/php/php-src/commit/a7755f1361f5fdfa80d180b54e4b9256c03c0838 Raw diff: https://github.com/php/php-src/commit/a7755f1361f5fdfa80d180b54e4b9256c03c0838.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Fix null handler generation for unspecialized VMs (#25579) Changed paths: M NEWS M Zend/zend_vm_gen.php Diff: diff --git a/NEWS b/NEWS index 5a90f780e75f..678be8b0cae6 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,8 @@ PHP NEWS . Fixed object_properties_load() adding integer keys to property tables, which made the properties unreadable and clone hit an assertion. (Nicolas Grekas) + . Fixed bug GH-25571 (Incorrect null handlers when generating unspecialized + Zend VMs). (Weilin Du) - Curl: . Fixed curl_reset() retaining CURLOPT_PRIVATE after reset. (lacatoire) diff --git a/Zend/zend_vm_gen.php b/Zend/zend_vm_gen.php index 4f4dacb8523b..d2a0c48d245d 100755 --- a/Zend/zend_vm_gen.php +++ b/Zend/zend_vm_gen.php @@ -1463,18 +1463,7 @@ function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array() while ($next != $num) { // If some opcode numbers are not used then fill hole with pointers // to handler of undefined opcode - switch ($kind) { - case ZEND_VM_KIND_CALL: - case ZEND_VM_KIND_TAILCALL: - out($f,$prolog."ZEND_NULL{$variant}_HANDLER,\n"); - break; - case ZEND_VM_KIND_SWITCH: - out($f,$prolog."-1,\n"); - break; - case ZEND_VM_KIND_GOTO: - out($f,$prolog."(void*)&&ZEND_NULL_LABEL,\n"); - break; - } + gen_null_label($f, $kind, $prolog); $next++; } if ($num >= 256) { @@ -1510,18 +1499,7 @@ function gen_labels($f, $spec, $kind, $prolog, &$specs, $switch_labels = array() } $list[] = $dsc["op"]; } else { - switch ($kind) { - case ZEND_VM_KIND_CALL: - case ZEND_VM_KIND_TAILCALL: - out($f,$prolog."ZEND_NULL{$variant}_HANDLER,\n"); - break; - case ZEND_VM_KIND_SWITCH: - out($f,$prolog."-1,\n"); - break; - case ZEND_VM_KIND_GOTO: - out($f,$prolog."(void*)&&ZEND_NULL_LABEL,\n"); - break; - } + gen_null_label($f, $kind, $prolog); $list[] = null; } }

« previous php.cvs (#143867) next »