wasmer icon indicating copy to clipboard operation
wasmer copied to clipboard

llvm backend should use unordered atomics for load/store to shared memory

Open programmerjake opened this issue 3 years ago • 3 comments

iirc WebAssembly requires non-atomic load/store operations to have somewhat sane results when there is a data race, but in llvm data races of non-atomic load/stores are UB. the fix is to use llvm's unordered atomic ordering which is specificly designed for cases like this: https://releases.llvm.org/14.0.0/docs/Atomics.html#unordered

programmerjake avatar Jul 07 '22 01:07 programmerjake

Thanks for opening the issue! We'll take a look on this approach after releasing Wasmer 3.0

syrusakbary avatar Jul 12 '22 15:07 syrusakbary

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar May 03 '24 21:05 stale[bot]

version 3.0 was released, since this fixes UB in LLVM, I think it's worth taking a closer look at

programmerjake avatar May 03 '24 23:05 programmerjake