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

From: Date: Tue, 27 Oct 2026 19:40:31 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-142851@lists.php.net to get a copy of this message
Author: ndossche (ndossche) Date: 2026-10-27T20:40:18+01:00 Commit: https://github.com/php/php-src/commit/fb7fb98f68f01bb6c5e76826604e43e60ccf3097 Raw diff: https://github.com/php/php-src/commit/fb7fb98f68f01bb6c5e76826604e43e60ccf3097.diff Merge branch 'PHP-8.6' * PHP-8.6: opcache: Call orig_post_shutdown_cb() JIT: Discard veneers if generation failed Changed paths: M ext/opcache/ZendAccelerator.c M ext/opcache/jit/zend_jit_ir.c Diff: diff --git a/ext/opcache/ZendAccelerator.c b/ext/opcache/ZendAccelerator.c index 3834190ffe97..9eadc03bb16e 100644 --- a/ext/opcache/ZendAccelerator.c +++ b/ext/opcache/ZendAccelerator.c @@ -3723,6 +3723,11 @@ static void (*orig_post_shutdown_cb)(void); static void accel_post_shutdown(void) { + /* Call original shutdown prior to detaching SHM, so it can access its memory safely. */ + if (orig_post_shutdown_cb) { + orig_post_shutdown_cb(); + } + zend_shared_alloc_shutdown(); } diff --git a/ext/opcache/jit/zend_jit_ir.c b/ext/opcache/jit/zend_jit_ir.c index f9b1be1b3ea2..63ebcb47553c 100644 --- a/ext/opcache/jit/zend_jit_ir.c +++ b/ext/opcache/jit/zend_jit_ir.c @@ -470,6 +470,15 @@ static void zend_jit_commit_veneers(void) } } } + +static void zend_jit_discard_veneers(void) +{ + int i, count = sizeof(zend_jit_stubs) / sizeof(zend_jit_stubs[0]); + + for (i = 0; i < count; i++) { + zend_jit_stub_handlers[count + i] = NULL; + } +} #endif static bool zend_jit_prefer_const_addr_load(zend_jit_ctx *jit, uintptr_t addr) @@ -2932,7 +2941,11 @@ static void *zend_jit_ir_compile(ir_ctx *ctx, size_t *size, const char *name) #if defined(IR_TARGET_AARCH64) if (ctx->flags2 & IR_HAS_VENEERS) { - zend_jit_commit_veneers(); + if (entry) { + zend_jit_commit_veneers(); + } else { + zend_jit_discard_veneers(); + } } #endif

« previous php.cvs (#142851) next »