Skip to content

Commit c4487b7

Browse files
nielsdosiluuu1994
authored andcommitted
Initialize ping_auto_globals_mask to prevent undefined behaviour
Closes GH-10121
1 parent 6de376a commit c4487b7

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ PHP NEWS
1515

1616
- Opcache:
1717
. Fix inverted bailout value in zend_runtime_jit() (Max Kellermann).
18+
. Fix access to uninitialized variable in accel_preload(). (nielsdos)
1819

1920
- TSRM:
2021
. Fixed Windows shmget() wrt. IPC_PRIVATE. (Tyson Andre)

ext/opcache/ZendAccelerator.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4444,6 +4444,8 @@ static int accel_preload(const char *config, bool in_child)
44444444

44454445
if (PG(auto_globals_jit)) {
44464446
ping_auto_globals_mask = zend_accel_get_auto_globals();
4447+
} else {
4448+
ping_auto_globals_mask = 0;
44474449
}
44484450

44494451
if (EG(zend_constants)) {

0 commit comments

Comments
 (0)