Skip to content

Zend: delayed OOM clears the opline of a frame mid-op. - #25408

Draft
devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh25304
Draft

devnexen wants to merge 1 commit into
php:PHP-8.4from
devnexen:gh25304

Conversation

@devnexen

Copy link
Copy Markdown
Member

Fix #25304

zend_handle_delayed_oom() always reset EG(opline_before_exception) to NULL, even when called from zend_call_function() in the middle of an opcode. The JIT exception handler stubs then dereferenced it. Only the VM and JIT interrupt handlers run between two opcodes, so they now clear it instead.

Fix php#25304

zend_handle_delayed_oom() always reset EG(opline_before_exception) to NULL,
even when called from zend_call_function() in the middle of an opcode. The
JIT exception handler stubs then dereferenced it. Only the VM and JIT
interrupt handlers run between two opcodes, so they now clear it instead.

@iliaal iliaal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Reproduced the segfault under function and tracing JIT on an NTS debug 8.4 build; gone with the patch. This is an 8.4.28RC1 regression, so it should land before GA.

@devnexen devnexen closed this in 2f16c49 Nov 18, 2026
@iluuu1994 iluuu1994 reopened this Nov 18, 2026
@iluuu1994

Copy link
Copy Markdown
Member

See failure in https://github.com/php/php-src/actions/runs/44315751807/job/134841390791. This was temporarily reverted. Please fix the failure and merge again once ready.

@iluuu1994

Copy link
Copy Markdown
Member

@devnexen To clarify: The failure happened in 8.5. So the CI labels won't help here.

@devnexen

Copy link
Copy Markdown
Member Author

Ok what we can (because I ve tried my fix on 8.5) is to create a separate PR for 8.5 onwards with this change alone and then once merged merging this one again wdyt ?

@iluuu1994

Copy link
Copy Markdown
Member

@devnexen Yes, feel free to create a separate PR. You can also usually do that against your fork. I stopped the workflow for now to avoid hogging resources.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants