Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
bpo-46465: Check eval breaker in specialized CALL opcodes#30826
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
bpo-46465: Check eval breaker in specialized CALL opcodes #30826
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Fidget-Spinner commented Jan 23, 2022 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
Fidget-Spinner commented Jan 23, 2022
I added |
Uh oh!
There was an error while loading. Please reload this page.
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, the "error" label ends with DISPATCH(). It doesn't call CHECK_EVAL_BREAKER() even if we are coming from a CALL target which can get a signal (or any other reason to break the ceval).
I'm not sure that I like the test decorator, it makes a test 16x slower :-(
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
vstinner commented Jan 23, 2022
In Python 3.10, the error label ends with "goto main_loop" which does check for the ceval breaker atomic variable, no? |
vstinner commented Jan 23, 2022
CALL_NO_KW_PY_SIMPLE optimization goes to start_frame which ends with DISPATCH(): it seems like the CHECK_EVAL_BREAKER() check has been eaten by the optimization, between Python 3.10 and 3.11. Either start_frame or start_frame should call CHECK_EVAL_BREAKER(). |
vstinner commented Jan 23, 2022
The ceval.c change are enough for almost all TARGET, except CALL_NO_KW_PY_SIMPLE which miss CHECK_EVAL_BREAKER() somewhere, but it can be fixed in a separated PR (with a fix for "error" label ? ;-)) if you prefer. |
Co-Authored-By: Victor Stinner <[email protected]>
Fidget-Spinner commented Jan 23, 2022
Yeah I'd prefer another PR for that. I don't think those changes came with the |
vstinner left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Mark Shannon <[email protected]>
Fidget-Spinner commented Jan 24, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Strange, Ubuntu tests fail even on non-specialized code. I'll look into it. |
| # Tests both adaptive and specialized opcodes for proper | ||
| # CHECK_EVAL_BREAKER(). See bpo-46465 for an example bug. | ||
| @repeat_cpython_adaptative |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I've tested in https://bugs.python.org/issue46709 there several more test cases that require this decorator:
- testInterruptCaught
- testSecondInterrupt
- testTwoResults
Fidget-Spinner commented Feb 12, 2022
Sorry, can I trouble someone here to take over this PR please? I can't complete it right now. |
sobolevn commented Feb 12, 2022
@Fidget-Spinner I will cover your back 😉 |
https://bugs.python.org/issue46465