[New-bugs-announce] [issue42083] PyStructSequence_NewType broken in 3.8

Xemistry GmbH report at bugs.python.org
Mon Oct 19 14:27:05 EDT 2020


New submission from Xemistry GmbH <wdi at xemistry.com>:

Calling PyStructSequence_NewType() with a NULL field in the desc.doc parameter (explicitly allowed as per docs) leads to a crash in 

Objects/typeobject.c:2956
2956                size_t len = strlen(old_doc)+1;

where old_doc is NULL.
If the doc string is set, the call succeeds, but with a warning

(stdin):1: DeprecationWarning: builtin type G_SGROUP has no __module__ attribute

(where G_SGROUP is my new type), which did not happen in 3.6, and which I do not think can be suppressed by function call arguments.

----------
components: C API
messages: 378978
nosy: wdi2
priority: normal
severity: normal
status: open
title: PyStructSequence_NewType broken in 3.8
type: crash
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42083>
_______________________________________


More information about the New-bugs-announce mailing list