Message324498
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 |
|
| Date |
User |
Action |
Args |
| 2018-09-03 07:06:18 | ronaldoussoren | set | recipients:
+ ronaldoussoren, steven.daprano, DeKrain |
| 2018-09-03 07:06:18 | ronaldoussoren | set | messageid: <[email protected]> |
| 2018-09-03 07:06:18 | ronaldoussoren | link | issue34543 messages |
| 2018-09-03 07:06:18 | ronaldoussoren | create | |
|