Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UB fixes #86

Merged
merged 4 commits into from Dec 25, 2022
Merged

UB fixes #86

merged 4 commits into from Dec 25, 2022

Conversation

vorner
Copy link
Owner

@vorner vorner commented Dec 25, 2022

No description provided.

clubby789 and others added 3 commits December 25, 2022 12:09
Also improve performance of some tests in Miri
Turn into a pointer without re-borrowing.
Introduce a bit of future proof code to properly "close the brackets"
around some operations (todays there are no-ops).

Provide a bit of documentation for it, explaining the gymnastics there.
@codecov-commenter
Copy link

Codecov Report

Merging #86 (56951c8) into master (a41840b) will decrease coverage by 0.52%.
The diff coverage is 66.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #86      +/-   ##
==========================================
- Coverage   80.85%   80.32%   -0.53%     
==========================================
  Files          16       16              
  Lines         799      803       +4     
==========================================
- Hits          646      645       -1     
- Misses        153      158       +5     
Impacted Files Coverage Δ
src/ref_cnt.rs 71.42% <50.00%> (-3.58%) ⬇️
src/debt/list.rs 91.20% <100.00%> (ø)
src/lib.rs 88.20% <100.00%> (ø)
src/debt/helping.rs 84.37% <0.00%> (-4.69%) ⬇️

The idea is that the whole list (tail of the list) is synchronized by
the access of the head. Nevertheless, we fill in the next pointer before
that and having a reference is formally considered a read of the
destination. Even though we _use_ the reference only after the
synchronization point, we have it before and MIRI considers it a data
race.

Using a pointer is fine, as dereferencing is manual and considered read
only at that point.
@vorner vorner merged commit ca4b62f into master Dec 25, 2022
@vorner vorner deleted the ub-ref branch December 25, 2022 13:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants