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

ben-manes / caffeine / #4880
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: v3.dev
DEFAULT BRANCH: master
Ran 28 May 2025 10:49AM UTC
Jobs 1
Files 78
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

28 May 2025 09:42AM UTC coverage: 99.948%. Remained the same
#4880

push

github

ben-manes
Use stronger memory order to avoid publication races (fixes #1820)

TSAN detected a theoretical race for a weak valued cache during a #put
call. This can happen on a weak memory model like aarch64 if it also
aggressively reorders. Tracing with Charles Munger (Google), we decided
that the key and value should use acquire semantics and opaque
elsewhere to document the intentions. However this was based on logical
reasoning of our understandings of the memory models, as we could not
reproduce the results to determine if it was a true or false positive.
The TSAN issue pointed to the WeakReference constructor accepting the
key reference as a plain field and being read as one, which should be
benign race as either the user's or a sentinel value.

On a 14-core M3 Max, under heavy load the existing test
Issue568Test#intermittentNull() fails due to incorrectly observing a
null value. The additional multi-threaded test cases incur enough load
to trigger this on this machine. The CircleCI arm64 instance does not
aggressive recorder enough or offer enough concurrency to expose this
race. This is different from the TSAN issue, but highlights the same
fundamental flaw.

Release semantics only apply to the field itself and does not provide
a strong enough happens-before edge for the newly constructed object
for its publication to be complete. A volatile fence is required in
this case since the fields are non-final.

7730 of 7734 relevant lines covered (99.95%)

1.0 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #4880.1 28 May 2025 10:49AM UTC 78
99.95
Source Files on build #4880
  • Tree
  • List 78
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #4880
  • 786d1c85 on github
  • Prev Build on v3.dev
  • Next Build on v3.dev
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc