Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Zend: handle IS_REFERENCE in _zendi_try_convert_scalar_to_number() #20876

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

Open
arshidkv12 wants to merge 7 commits into php:master
base: master
Choose a base branch
Loading
from arshidkv12:scalar-number

Conversation

@arshidkv12
Copy link

@arshidkv12 arshidkv12 commented Jan 9, 2026
edited
Loading

_zendi_try_convert_scalar_to_number() did not explicitly handle IS_REFERENCE operands, which could result in hitting the EMPTY_SWITCH_DEFAULT_CASE()` assertion when references reached the function.

#20873

Copy link
Member

devnexen commented Jan 9, 2026
edited
Loading

is your PR actually fixing this particular issue or is it the wrong one ? completely unrelated. (削除) Beside I m not even sure the change is correct (or needed more precisely) actually, looking at the bigger picture. (削除ここまで) nevermind, the issue is actually #20873 but then your change, while passing the assertion, now gives a zendmm leak.

Copy link
Author

Sorry.. it is #20873. I will check the memory leak.

Copy link
Author

arshidkv12 commented Jan 9, 2026
edited
Loading

Also fixes #20875.

Copy link
Member

ndossche commented Jan 9, 2026

This looks wrong, I don't understand the trick with Z_EXTRA, and I believe handling references in _zendi_try_convert_scalar_to_number is wrong. Note that the root cause of the issue is that a reference ends up in a TMP, which is not allowed.

Copy link
Member

Probably also related to GH-20854, looks very similar.

Copy link
Author

arshidkv12 commented Jan 10, 2026
edited
Loading

Thank you. Please check the new commit: 842a996.

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

Reviewers

@dstogov dstogov Awaiting requested review from dstogov dstogov is a code owner

@DanielEScherzer DanielEScherzer Awaiting requested review from DanielEScherzer DanielEScherzer is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /