Skip to content

Commit 578cdf1

Browse files
committed
fix: dangling opline in ZEND_INIT_ARRAY
This causes problems if an allocation profiler decides to walk the stack, or if the engine itself OOMs on this opcode, and it tries to print file and line information.
1 parent 8e5b312 commit 578cdf1

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

Zend/zend_vm_def.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6281,6 +6281,7 @@ ZEND_VM_HANDLER(71, ZEND_INIT_ARRAY, CONST|TMP|VAR|CV|UNUSED, CONST|TMPVAR|UNUSE
62816281
uint32_t size;
62826282
USE_OPLINE
62836283

6284+
SAVE_OPLINE();
62846285
array = EX_VAR(opline->result.var);
62856286
if (OP1_TYPE != IS_UNUSED) {
62866287
size = opline->extended_value >> ZEND_ARRAY_SIZE_SHIFT;

Zend/zend_vm_execute.h

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)