2

InitOnce: synchronize with completion when already complete by DrMeepster · Pull...

 1 year ago
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.
neoserver,ios ssh client

Contributor

@DrMeepster 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.

All reactions

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK