Skip to content

curses.napms() aborts with a SystemError #126313

Closed
@devdanzin

Description

@devdanzin

Crash report

What happened?

The abort happens on normal and no-gil debug builds, release builds also hit the SystemError.

import curses
curses.napms(37)

Error is:

Fatal Python error: _Py_CheckFunctionResult: a function returned a result with an exception set
Python runtime state: initialized
_curses.error: must call initscr() first

The above exception was the direct cause of the following exception:

SystemError: <built-in function napms> returned a result with an exception set

Current thread 0x00007fe41a8c3740 (most recent call first):
  File "/home/fusil/python-73/curses-fatal/source.py", line 3 in <module>
Aborted

Found using fusil by @vstinner.

CPython versions tested on:

3.13, 3.14, CPython main branch

Operating systems tested on:

Linux

Output from running 'python -VV' on the command line:

Python 3.14.0a1+ experimental free-threading build (heads/main:d467d9246c, Nov 1 2024, 09:05:56) [GCC 11.4.0]

Linked PRs

Metadata

Metadata

Assignees

Labels

3.13bugs and security fixes3.14bugs and security fixesextension-modulesC modules in the Modules dirtype-crashA hard crash of the interpreter, possibly with a core dump

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions