InitOnce: synchronize with completion when already complete by DrMeepster · Pull...
source link: https://github.com/rust-lang/miri/pull/2641
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Contributor
DrMeepster commented Oct 31, 2022
The completion of an InitOnce happens-before the threads waiting on it wake up. However, this is not the case for threads that call InitOnceBeginInitialize
after the completion, leading to data races and outdated weak memory loads as observed in the CI for #2638. This PR fixes this.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK