Comments (7)
Thanks for finding this. It's this assert:
assert((this_instr + 2)->opcode == _PUSH_FRAME);
in _INIT_CALL_PY_EXACT_ARGS
in optimizer_bytecodes.c. I added that a few days ago. I'll come up with a fix.
from cpython.
@gvanrossum I dug into this further and it's actually two bugs:
- The assert in the optimizer is wrong, it could end with _EXIT_TRACE, but the second bug in the tracer itself is more nefarious and actually crashes uops:
- With how we create traces for stuff that goes too deep, it seems it's not side exiting to the correct place.
from cpython.
Oh, thanks! If you have time for a fix I can review it.
from cpython.
Maybe it's better to back out the entire sequence of uops generated by the CALL_*
instruction containing the push?
from cpython.
Maybe it's better to back out the entire sequence of uops generated by the CALL_* instruction containing the push?
Yeah that seems better. Right now it's deopting after _INIT_CALL_PY_EXACT_ARGS which creates a new frame, this means the stack is inconsistent with CALL_PY_EXACT_ARGS and the whole thing crashes.
from cpython.
In the end I think it's better to emit the _PUSH_TRACE
(it was being emitted until I refactored that code a few days ago).
from cpython.
Thanks for getting to this so quickly! This fix should also simplify an edge case for #116168 too, which is helpful for me.
from cpython.
Related Issues (20)
- Is it possible to remove the feature of auto-completing parentheses for a callable in REPL? HOT 5
- PyTuple_SetItem documentation doesn't warn about refcount requirements HOT 1
- csv.reader ignoring quotechar HOT 5
- CFG to instructions creates too many label IDs
- multiprocessing: Add note that Array(c_char, 128).value is null-terminated
- test.libregrtest race condition in runtest_mp leads to 30 second delay in free-threaded build
- DocTestCase should report as skipped if the doctest itself is skipped
- Use stop-the-world to make `sys._current_frames()` and `sys._current_exceptions()` thread-safe in free-threaded build
- Free-threading crash involving `os.fork()` and `PyThreadState_DeleteCurrent()`
- Fix thread-safety for `PyType_IsSubtype` in free-threaded builds
- Tron Program HOT 1
- `_ssl._SSLContext` construction crashes when a bad build results in an empty `PY_SSL_DEFAULT_CIPHER_STRING` #define
- Auto-complete modules for `import` and `from` statements in REPL HOT 2
- email.policy.EmailPolicy._fold() breaking multi-byte Unicode sequences
- Use "import a.b" but a.b may not be what I want, even not a module HOT 3
- isinstance(list[anything], type) returns False since Python 3.11 HOT 1
- codecs.Stream{Reader,Writer} close parent stream on __exit__ HOT 4
- Make `cell` thread-safe in the free-threaded build
- The codecs module mostly but not fully supports non str<->bytes codecs
- re.Match.__getitem__ may support tuples and slices HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpython.