## Summary I tried to run [scrapscript.py](https://github.com/tekknolagi/scrapscript) with RustPython. It crashed. I reduced the input code with CReduce and then manually from ~4k lines to 21 lines. ## Expected No crash. In the full example, I expect the test suite to run. In the reduced example I expect nothing to happen. ## Actual ```python # scrapscript.py class LeftParen: pass class RightParen: pass class Lexer: def read_char(self) : return None def read_one(self) : while self: c = self.read_char() break else: return x { "(": LeftParen, ")": RightParen} def tokenize(): lexer = Lexer() while (lexer.read_one()) : pass tokenize() ``` ``` cedar% rustpython scrapscript.py test [vm/src/frame.rs:1942] self = ExecutingFrame { code: code: <code object read_one at ??? file "scrapscript.py", line 8>, state: FrameState { stack: [ [PyObject PyStr { value: "(", kind: Ascii, hash: -1 }], [PyObject [PyType LeftParen]], [PyObject PyStr { value: ")", kind: Ascii, hash: -1 }], ], blocks: [], lasti: 16, }, } thread 'main' panicked at vm/src/frame.rs:1943:9: tried to push value onto stack but overflowed max_stackdepth note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace cedar% ```
Activity
youknowone commentedon May 20, 2024
#5273 fixed a max_stackdepth calculation bug.
tekknolagi commentedon May 20, 2024
Building from main (5d6d1a6) and running still crashes in the same way.
tekknolagi commentedon May 20, 2024
Reduced further:
tekknolagi commentedon May 20, 2024
Add regression tests for six silently-fixed issues
Add regression tests for six silently-fixed issues
youknowone commentedon Apr 20, 2026
reported as fixed by @changjoon-park
Add regression tests for six silently-fixed issues