python / python/cpython

Data race of `should_auto_add_history` in file `Modules/readline.c`

Open
#154,539 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

extension-modules type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

Read and write of variable should_auto_add_history in file Modules/readline.c is not atomic, thus could be data race in free thread build. For detailed report please see TSAN-0025 from the parent issue #153852.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs
  • gh-154531

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in Modules/readline.c at reads and writes of should_auto_add_history, then read the TSAN-0025 report linked from parent issue #153852. Review linked PR gh-154531 and verify that the reported race is addressed in the free-threaded build.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.