• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aio-libs / multidict / 35471524033
87%

Build:
DEFAULT BRANCH: master
Ran 19 Sep 2026 09:49PM UTC
Jobs 1
Files 39
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Sep 2026 09:48PM UTC coverage: 87.227%. Remained the same
35471524033

push

github

web-flow
Use release/acquire ordering for the retired-table reader count (#1481)

<!-- Thank you for your contribution! -->

## What do these changes do?

Fixes a ThreadSanitizer-flagged data race on the free-threaded build:
`keys->num_readers`, which gates whether a retired hash table is safe
to free, was incremented, decremented, and checked entirely with
relaxed atomics. Relaxed ops give no happens-before guarantee, so a
lock-free reader's in-progress field reads were not formally ordered
before a concurrent free of the same table. This adds `_acquire`/
`_release` atomic helpers to `atomic_helpers.h` and uses release on
the reader-exit decrement, acquire on the drain's free check. The
increment stays relaxed, and the coarse `num_active_readers` gate
keeps its existing seq_cst ordering, which it needs for an unrelated
(Dekker-style) reason spelled out in the surrounding comment.

## Are there changes in behavior for the user?

No. This only strengthens internal memory ordering on the
free-threaded build's lock-free read path; there is no change to any
public API or observable behavior.

## Is it a substantial burden for the maintainers to support this?

No. It adds two small, narrowly-scoped helper functions matching the
existing style of `atomic_helpers.h` and updates three call sites plus
their design comment.

## Related issue number

N/A

## Checklist

- [x] I think the code is well written
- [x] Unit tests for the changes exist
- [x] Documentation reflects the changes
- [ ] If you provide code modification, please add yourself to
`CONTRIBUTORS.txt`
- [x] Add a new news fragment into the `CHANGES/` folder
- [x] `make doc-spelling` passes and any new technical words are added
to `docs/spelling_wordlist.txt`

<details>
<summary>Agent run details (optional, for reviewers)</summary>

Found via the ThreadSanitizer CI job on an unrelated PR
(aio-libs/multidict#1480), which caught this pre-existing race on
master.

Tests: full suite passed on both the default C... (continued)

756 of 1512 branches covered (50.0%)

Branch coverage included in aggregate %.

6237 of 6505 relevant lines covered (95.88%)

1.92 hits per line

Jobs
ID Job ID Ran Files Coverage
1 MyPy - 35471524033.1 19 Sep 2026 09:49PM UTC 78
87.23
GitHub Action Run
Source Files on build 35471524033
  • Tree
  • List 39
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35471524033
  • 7310298a on github
  • Prev Build on master (#35434291836)
  • Next Build on master (#35494081628)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc