Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  Reset global pointers to prevent use-after-free
This commit is contained in:
Niels Dossche 2025-07-30 09:22:50 +02:00
commit 7016ad558b
No known key found for this signature in database
GPG key ID: B8A8AD166DF0E2E5
2 changed files with 11 additions and 0 deletions

3
NEWS
View file

@ -2,6 +2,9 @@ PHP NEWS
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.2.30 ?? ??? ????, PHP 8.2.30
- Opcache:
. Reset global pointers to prevent use-after-free in zend_jit_status().
(Florian Engelhardt)
03 Jul 2025, PHP 8.2.29 03 Jul 2025, PHP 8.2.29

View file

@ -5085,6 +5085,14 @@ ZEND_EXT_API void zend_jit_shutdown(void)
#else #else
zend_jit_trace_free_caches(&jit_globals); zend_jit_trace_free_caches(&jit_globals);
#endif #endif
/* Reset global pointers to prevent use-after-free in `zend_jit_status()`
* after gracefully restarting Apache with mod_php, see:
* https://github.com/php/php-src/pull/19212 */
dasm_ptr = NULL;
dasm_buf = NULL;
dasm_end = NULL;
dasm_size = 0;
} }
static void zend_jit_reset_counters(void) static void zend_jit_reset_counters(void)