Skip to content

Fix GH-10437: Set active fiber to null on bailout #10443

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 28, 2023

Conversation

trowski
Copy link
Member

@trowski trowski commented Jan 25, 2023

A bailout in a fiber is not setting the active fiber to NULL, causing Fiber::getCurrent() to return a bogus Fiber object from {main} in a shutdown function.

This is a simple fix, setting EG(active_fiber) to NULL before forwarding the bailout.

Copy link
Member

@devnexen devnexen left a comment

Choose a reason for hiding this comment

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

LCTM

@trowski trowski merged commit 284c293 into php:PHP-8.1 Jan 28, 2023
trowski added a commit that referenced this pull request Jan 28, 2023
* PHP-8.1:
  Fix GH-10437: Set active fiber to null on bailout (#10443)
trowski added a commit that referenced this pull request Jan 28, 2023
* PHP-8.2:
  [ci skip] NEWS
  Fix GH-10437: Set active fiber to null on bailout (#10443)
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.

2 participants