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.

Author ronaldoussoren
Recipients DeKrain, ronaldoussoren, steven.daprano
Date 2018-09-03.07:06:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1535958378.83.0.56676864532.issue34543@psf.upfronthosting.co.za>
In-reply-to
Content
IMHO SystemError is the wrong exception, that exception is primarily used to signal implementation errors.

BTW. I can reproduce crashes in a couple of runs of your scriptlet:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from _struct import Struct
>>> for i in range(100000):
...     L = [Struct.__new__(Struct) for j in range(1000)]
...     for s in L:
...         try:
...             x = s.pack_into(bytearray())
...         except SystemError:
...             pass
... 
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
TypeError: 'code' object cannot be interpreted as an integer
>>>             
>>> from _struct import Struct
>>> for i in range(100000):
...     L = [Struct.__new__(Struct) for j in range(1000)]
...     for s in L:
...         try:
...             x = s.pack_into(bytearray())
...         except SystemError:
...             pass
... 
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
TypeError: 'traceback' object cannot be interpreted as an integer
>>> 
>>> 
>>> 
>>> from _struct import Struct
>>> for i in range(100000):
...     L = [Struct.__new__(Struct) for j in range(1000)]
...     for s in L:
...         try:
...             x = s.pack_into(bytearray())
...         except SystemError:
...             pass
... 
Segmentation fault: 11
History
Date User Action Args
2018-09-03 07:06:18ronaldoussorensetrecipients: + ronaldoussoren, steven.daprano, DeKrain
2018-09-03 07:06:18ronaldoussorensetmessageid: <1535958378.83.0.56676864532.issue34543@psf.upfronthosting.co.za>
2018-09-03 07:06:18ronaldoussorenlinkissue34543 messages
2018-09-03 07:06:18ronaldoussorencreate