RacyCell<T>: Data race allowed on T#390
Conversation
|
The fact that this PR doesn't break CI suggests that RacyCell isn't needed however. I think all uses can be replaced with the unstable |
|
I agree with what you said. This may not cause a direct data race. But making the above changes can be useful. |
I guess you mean the |
phil-opp
left a comment
There was a problem hiding this comment.
Looks reasonable to me, thanks for submitting!
Hi,
I found a memory-safety/soundness issue in this crate while scanning Rust code for potential vulnerabilities. This PR contains a fix for the issue.
Issue Description
RacyCell<T>unconditionally implements Sync. This allows users to create data races onT: !Sync. Such data races can lead to undefined behavior.bootloader/bios/common/src/racy_cell.rs
Line 21 in c5e5ed2