[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread DeKrain
DeKrain added the comment: I think we should leave 'Extension Modules' in components field, because implementation of struct module is really written in C. -- ___ Python tracker <https://bugs.python.o

[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-08-29 Thread DeKrain
DeKrain added the comment: (I wrote that I'm importing from _struct just for this issue.) I've seen that tp_new of PyStructType is set to s_new in Modules/_struct.c. And that crash is most likely caused by access to uninitialized memory, so it is not

[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-08-29 Thread DeKrain
DeKrain added the comment: Well, sometimes when i do >>> b = bytearray() >>> s.pack_into(b) application crashes (because it checks arg #1, which is not initialized). Also, I imported from _struct, because it's where implementati

[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-08-29 Thread DeKrain
New submission from DeKrain : >>> from _struct import Struct >>> s = Struct.__new__(Struct) >>> s.unpack_from(b'asdf') Traceback (most recent call last): File "", line 1, in SystemError: /Objects/tupleobject.c:84: Bad argument to internal f