Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
gh-134889: Fix handling of a few opcodes when optimizingLOAD_FAST
#134958
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
`FORMAT_SIMPLE` leaves its operand on the stack if its a unicode object.Since we cannot determine that at analysis (compile) time, treat itconservatively and assume it always leaves the operand on the stack.
It leaves the function on the stack
`GET_YIELD_FROM_ITER` doesn't consume its operand if its a coroutineor generator, so treat it conservatively.`END_SEND` leaves the TOS.
It leaves the TOS in place.
Load special may leave `self` on TOS. Treat it conservatively andassume it always does.
I suppose this means Python 3.14 is going to see an ABI breakage too, is that correct? |
I don’t think so. This doesn’t change the binary layout of anything. What about this would cause an ABI breakage? |
It changed |
I think I’m missing something. The magic number changes with every minor release. Since we haven’t released 3.14 yet, bumping the magic number shouldn’t cause any additional pain beyond what’s felt with a normal release. |
A few Linux distributions have already engaged in a lot of Python 3.14 testing (at least Fedora and Gentoo I'm aware of), and these systems will be affected by the magic number change. |
In Fedora, we can deal with the chnage of the magic number in b3. But the sooner it happens the better. |
Uh oh!
There was an error while loading.Please reload this page.
We were incorrectly handling a few opcodes that leave their operands on the stack. Treat all of these conservatively; assume that they always leave operands on the stack.
FORMAT_SIMPLE
leaves its operand on the stack if its a unicode object.GET_YIELD_FROM_ITER
leaves its operand on the stack if its a coroutine or generator object.END_SEND
leaves the TOS in place.SET_FUNCTION_ATTRIBUTE
leaves the TOS in place.PUSH_EXC_INFO
leaves the TOS in place.LOAD_SPECIAL
may leave the TOS (self) in place.python: Objects/unicodeobject.c:10387: _PyUnicode_JoinArray: Assertion
res_data == PyUnicode_1BYTE_DATA(res) + kind * PyUnicode_GET_LENGTH(res)' failed.` in sqlglot #134889