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

Fix fuzzer runner #19676

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
nielsdos wants to merge 2 commits into php:master
base: master
Choose a base branch
Loading
from nielsdos:fix-fuzzer-again
Open

Fix fuzzer runner #19676

nielsdos wants to merge 2 commits into php:master from nielsdos:fix-fuzzer-again

Conversation

Copy link
Member

@nielsdos nielsdos commented Sep 2, 2025

We must take into account the calling convention of the tailcall vm.

We must take into account the calling convention of the tailcall vm.
Copy link
Member

@arnaud-lb arnaud-lb 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!

Copy link
Member

Oh, however, opline->handler will not return immediately - it calls the next handler instead, so it will bypass the step limit.

I suggest to fetch the stepping-friendly handler func with zend_get_opcode_handler_func(), like in https://github.com/arnaud-lb/php-src/blob/73b98a385848f4800cf81392b09d648e8cd5a698/ext/opcache/jit/zend_jit_trace.c#L8921.

Copy link
Member Author

nielsdos commented Sep 3, 2025

Okay done that now, but I wonder how expensive the hash+array lookup is :|

Copy link
Member

Is the step limit still necessary? Can't we use set_time_limit() or rely on the fuzzer's own time limit?

Otherwise, if the lookup is too slow, you can disable the TAILCALL VM by setting php_cv_preverve_none=no during configure.

Copy link
Member Author

nielsdos commented Sep 7, 2025

Is the step limit still necessary? Can't we use set_time_limit() or rely on the fuzzer's own time limit?

I'm not sure, I suppose this is more graceful handling the way it is now. Are there scenarios when the time limit won't work (e.g. a bug somewhere causing infinite loops)?

Otherwise, if the lookup is too slow, you can disable the TAILCALL VM by setting php_cv_preverve_none=no during configure.

I compared the performance of TAILCALL+HT vs CALL+NO-HT. I found that after running a while on an i7-4790 I get around ~12000 exec/s for TAILCALL+HT and ~13500 exec/s for CALL+NO-HT.

arnaud-lb reacted with thumbs up emoji

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

@arnaud-lb arnaud-lb arnaud-lb approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

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