Skip to content

Properly initialize _override executor globals #16658

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

Closed
wants to merge 2 commits into from

Conversation

cmb69
Copy link
Member

@cmb69 cmb69 commented Oct 31, 2024

These have been introduced a while ago[1], but their initialization has been overlooked. Since we cannot rely on TLS variables to be zeroed, we catch up on this.

[1] e3ef7bb


Noticed this due to https://github.com/php/php-src/actions/runs/11615281464/job/32345470147#step:6:79. Since extensions might access EG(filename_override) and EG_(lineno_override) we better fix this for all affected PHP versions.

cc @iluuu1994

These have been introduced a while ago[1], but their initialization has
been overlooked.  Since we cannot rely on TLS variables to be zeroed,
we catch up on this.

[1] <php@e3ef7bb>
@iluuu1994
Copy link
Member

iluuu1994 commented Oct 31, 2024

I think it's initialized in init_executor(), no? lineno_override should also be initialized to -1.

Edit: Ah, I see. It's too late now that we use zend_get_executed_filename_ex() during startup.

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Thank you!

Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com>
@cmb69 cmb69 closed this in ec68d3c Oct 31, 2024
@cmb69 cmb69 deleted the cmb/init-overrides branch October 31, 2024 22:42
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