Skip to content

[3.15] gh-153291: Fix data race in readline.get_completer() and get_pre_input_hook() (gh-153362)#154418

Open
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-90b6a79-3.15
Open

[3.15] gh-153291: Fix data race in readline.get_completer() and get_pre_input_hook() (gh-153362)#154418
miss-islington wants to merge 1 commit into
python:3.15from
miss-islington:backport-90b6a79-3.15

Conversation

@miss-islington

@miss-islington miss-islington commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The setters store these hooks while holding the module critical section
(via set_hook's Py_XSETREF), but the getters read and Py_NewRef the same
fields without it. Annotate both getters with @critical_section, matching
the other readline functions (gh-126895).
(cherry picked from commit 90b6a79)

Co-authored-by: Harjoth Khara harjoth.khara@gmail.com
Co-authored-by: Neil Schemenauer nas-github@arctrix.com

…e_input_hook() (pythongh-153362)

The setters store these hooks while holding the module critical section
(via set_hook's Py_XSETREF), but the getters read and Py_NewRef the same
fields without it. Annotate both getters with @critical_section, matching
the other readline functions (pythongh-126895).
(cherry picked from commit 90b6a79)

Co-authored-by: Harjoth Khara <harjoth.khara@gmail.com>
Co-authored-by: Neil Schemenauer <nas-github@arctrix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants