[New-bugs-announce] [issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError
DeKrain
report at bugs.python.org
Wed Aug 29 12:18:52 EDT 2018
New submission from DeKrain <dawidkrainski8 at gmail.com>:
>>> from _struct import Struct
>>> s = Struct.__new__(Struct)
>>> s.unpack_from(b'asdf')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: /Objects/tupleobject.c:84: Bad argument to internal function
In Modules/_struct.c:
static PyObject *
s_unpack_internal(PyStructObject *soself, const char *startfrom) {
...
PyObject *result = PyTuple_New(soself->s_len);
// soself->s_len is -1, set in Struct.__new__
----------
components: Extension Modules
messages: 324330
nosy: DeKrain
priority: normal
severity: normal
status: open
title: _struct.Struct: calling functions without calling __init__ results in SystemError
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34543>
_______________________________________
More information about the New-bugs-announce
mailing list