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

zopefoundation / zope.interface / 35829216186
99%

Build:
DEFAULT BRANCH: master
Ran 23 Sep 2026 07:01AM UTC
Jobs 1
Files 51
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

23 Sep 2026 06:57AM UTC coverage: 98.956% (+0.002%) from 98.954%
35829216186

push

github

web-flow
Fix free-threaded data race in the C LookupBase cache (#380) (#382)

* Fix free-threaded data race in the C LookupBase cache (#380)

On a free-threaded (no-GIL) build, concurrent lookup() and changed() calls
on a LookupBase could crash the interpreter (PyMutex_Unlock / SIGSEGV): the
_cache/_mcache/_scache fields were created (ASSURE_DICT) and cleared
(Py_CLEAR) without synchronization. The earlier PyDict_GetItemRef migration
fixed the dict-contents borrowed references but not the field lifecycle.

Guard the field lifecycle with a critical section on Python 3.13+ (a no-op
block earlier, where the GIL serializes): the create/read publishes a dict
allocated outside the lock and returns a strong reference under the lock, and
changed() detaches the fields under the lock and decrefs them after releasing
it. No Python runs while the lock is held, so it cannot deadlock. This
guarantees memory safety; it does not make invalidation linearizable (a
lookup may still populate a retired cache generation), which matches the
cache's semantics.

Adds a subprocess-isolated concurrency regression test.

Assisted-by: Claude Code:claude-fable-5-1

* Fix remaining LookupBase cache race window

* Fix VerifyingBase concurrent invalidation

* Reuse LB_changed() in verify_changed() and document last-writer-wins publish

- verify_changed() now invalidates the lookup caches through LB_changed()
  instead of detaching the three LB fields by hand, so the cache fields are
  enumerated in LB_traverse, LB_clear and LB_changed only. Invalidation
  becomes two state transitions; the comment records that a concurrent
  reader may observe cleared caches with the previous verification pair
  still installed and verifies against that pair as before.
- The publish of the _verify_ro/_verify_generations pair is last-writer-wins;
  the comment now says so and states the redundant invalidation as the
  accepted cost.

No test change. The concurrency module and the full suite pass with this
chan... (continued)

990 of 1020 branches covered (97.06%)

Branch coverage included in aggregate %.

12186 of 12295 relevant lines covered (99.11%)

8.91 hits per line

Jobs
ID Job ID Ran Files Coverage
1 35829216186.1 23 Sep 2026 07:01AM UTC 51
98.96
GitHub Action Run
Source Files on build 35829216186
  • Tree
  • List 51
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #35829216186
  • 05f0f478 on github
  • Prev Build on master (#34198075869)
  • Next Build on master (#36331343683)
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