Skip to content

Commit 3aaa8d3

Browse files
realFlowControlnielsdos
authored andcommitted
Reset global pointers to prevent use-after-free
Closes GH-19212.
1 parent b633720 commit 3aaa8d3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

NEWS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
33
?? ??? ????, PHP 8.1.34
44

5-
5+
- Opcache:
6+
. Reset global pointers to prevent use-after-free in zend_jit_status().
7+
(Florian Engelhardt)
68

79
03 Jul 2025, PHP 8.1.33
810

ext/opcache/jit/zend_jit.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5087,6 +5087,14 @@ ZEND_EXT_API void zend_jit_shutdown(void)
50875087
#else
50885088
zend_jit_trace_free_caches(&jit_globals);
50895089
#endif
5090+
5091+
/* Reset global pointers to prevent use-after-free in `zend_jit_status()`
5092+
* after gracefully restarting Apache with mod_php, see:
5093+
* https://github.com/php/php-src/pull/19212 */
5094+
dasm_ptr = NULL;
5095+
dasm_buf = NULL;
5096+
dasm_end = NULL;
5097+
dasm_size = 0;
50905098
}
50915099

50925100
static void zend_jit_reset_counters(void)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy