Skip to content

_Py_FinishPendingCalls() Doesn't Necessarily Run All Remaining Pending Calls #118297

@ericsnowcurrently

Description

@ericsnowcurrently

Bug report

Bug description:

In Python/ceval_gil.c, _Py_FinishPendingCalls() calls make_pending_calls() once. make_pending_calls() will fail with the first pending call that fails (returns a non-zero value), leaving any remaining pending calls in the queue. _Py_FinishPendingCalls() basically throws away the error and walks away.

Instead, _Py_FinishPendingCalls() should keep trying until there are no pending calls left in the queue.

(I found this while working on gh-110693.)

CPython versions tested on:

3.13

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions