-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Crash in ZEND_RETURN/GC/zend_call_function #9323
Comments
@dstogov any thoughts? I can only see three calls to the GC from the VM, and only two of them lack SAVE_OPLINE(): one in ZEND_RETURN and another in ZEND_BIND_GLOBAL. I can make a patch that adds SAVE_OPLINE(), but usually you have your own ideas about how to fix this kind of thing. |
OK, no thoughts. My pull requests are getting more activity than this bug report, so I guess I will make a pull request. |
@tstarling thanks for detailed analyses and the patch. Sorry, I was on vacation and wasn't able to review this early. I'm not very happy, this is already committed, because this introduce slight performance penalty for very rare case. Anyway, thanks. I'll check if I can reduce overhead on top of this. |
After all, I think, the patch is fine and doesn't require any improvement. |
Hi @tstarling Could you help take a look on this #9536, seems they relative each other, I have checked and ext/opcache/ZendAccelerator.c:2217 got the uninitialised garbage also
Thank you! |
@navisoft this is a different problem. Frames for internal function don't have to initialize |
Description
I hit a segfault while running MediaWiki tests. I have not yet figured out how to make a short test case, but I was able to isolate the bug using gdb.
The code at frame 7 is:
It fails to call SAVE_OPLINE() before invoking the GC. At frame 0 we have
but EG(current_execute_data)->opline is uninitialised garbage, so dereferencing it segfaults.
PHP Version
PHP 8.0.20
Operating System
No response
The text was updated successfully, but these errors were encountered: