8000 REPL crash when trying to allocate more than sys.maxsize bytes · Issue #1279 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

REPL crash when trying to allocate more than sys.maxsize bytes #1279

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

Closed
ddiminnie opened this issue Oct 16, 2018 · 1 comment
Closed

REPL crash when trying to allocate more than sys.maxsize bytes #1279

ddiminnie opened this issue Oct 16, 2018 · 1 comment
Assignees

Comments

@ddiminnie
Copy link
ddiminnie commented Oct 16, 2018

If (either by sloppy programming [on the user's part] or some other mischance) an instruction requires more than sys.maxsize bytes to execute the REPL crashes. If I had to hazard a guess as to what is causing the problem I would suggest the trouble occurs when trying to compute the number of bytes to report in the MemoryLimit exception. (Note that I have no idea what is actually going on here...)

Here are the simplest steps to reproduce the problem I've managed to come up with in the short time I've messed with this:
>>> ''.join('a' for i in range(1024))
>>> _*2**29

@tannewt tannewt added this to the 4.0.0 - Bluetooth milestone Oct 17, 2018
@ddiminnie
Copy link
Author

If anyone wants a one-liner (instead of the example above) to reproduce this, the following will also work:
('a'*256)*2**29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0