-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Bisected to 33d95c6. Appears only on debug builds, otherwise passes silently.
import marshal
x = ({int}, memoryview(b''))
marshal.dumps(x)Output:
Fatal Python error: _Py_CheckSlotResult: Slot getbuffer of type memoryview succeeded with an exception set
Python runtime state: initialized
ValueError: unmarshallable object
Current thread 0x00007f213ea12280 (most recent call first):
File "/home/radislav/repro.py", line 22 in <module>
Aborted (core dumped)
In w_complex_object, when PyMarshal_WriteObjectToString is called on set item that is unmarshallable (int type in this case), an exception gets set on current tstate. Attempt to marshal next tuple item that is memoryview instance leads to call to PyObject_GetBuffer with exception being set.
I'll submit a PR.
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)type-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump