This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Crash On bytearray()
Type: Stage: resolved
Components: Versions: Python 3.6, Python 3.5
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: martin.panter, pabstersac
Priority: normal Keywords:

Created on 2016-07-18 09:08 by pabstersac, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg270731 - (view) Author: pablo sacristan (pabstersac) Date: 2016-07-18 09:08
There is a crash on bytearray(), not really a crash but rather the process gets killed by the kernel, but that is a crash, and the keyboard interrupt stops working while bytearray is working, so you can either restart python or wait for python to get killed by the kernel. The biggest problem is that while bytearray() is trying to do something, you can't interrupt it just doesn't work for some reason.
This should be enough for bytearray to crash :
bytearray(0xFFFFFFFFFF)
It crashes after some time with a Killed: 9 error.

Hope it helps ;)
msg270736 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-07-18 09:33
bytearray(n) needs to allocate n bytes. Unless your computer has 1024 GiB of memory, this is not going to be possible. If you are using an OS like Linux, it may pretend to allocate that much memory, and then kill the process when it realizes it has overallocated. If you need more robust behaviour on Linux, I suggest looking into disabling memory overcommit.
msg270737 - (view) Author: pablo sacristan (pabstersac) Date: 2016-07-18 09:37
I know, but then shouldn't you try limiting the amount of data it allocates? Or maybe allow for keyboard interrupts to be used while the it is going on, because keyboard interrupts weren't working while it was working.
History
Date User Action Args
2022-04-11 14:58:33adminsetgithub: 71746
2016-07-18 10:44:06martin.panterlinkissue27560 superseder
2016-07-18 09:49:26berker.peksagsetresolution: remind -> not a bug
stage: resolved
2016-07-18 09:37:12pabstersacsetresolution: not a bug -> remind
messages: + msg270737
2016-07-18 09:33:38martin.pantersetstatus: open -> closed

nosy: + martin.panter
messages: + msg270736

resolution: not a bug
2016-07-18 09:08:05pabstersaccreate