Stream: git-wasmtime

Topic: wasmtime / issue #3107 x64: avoid load-coalescing SIMD op...


view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2021 at 19:01):

alexcrichton commented on issue #3107:

One thing I noticed reading your thoughts on #2943 is that as an engine we have to assume that all loads/stores in wasm are unaligned, even if the alignment specified on the memory operation is aligned. The alignment in the memarg is just a hint and the wasm itself doesn't have to uphold the alignment. I suspect, though, that all wasm loads/stores are flagged as unaligned, so this should still fix the issue? (can tests be added?)

I presume that cranelift could still otherwise try to prove that an address is actually aligned, but I would be surprised if that were a cheap or already-implemented analysis...

view this post on Zulip Wasmtime GitHub notifications bot (Jul 21 2021 at 23:26):

abrown commented on issue #3107:

I'll probably leave this open until @cfallin takes a look: I think this type of change has to happen but maybe he can think of a better way.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2021 at 18:28):

alexcrichton commented on issue #3107:

Dealing with a signal and handling it I don't think should be too too hard on embedders, there's nothing really different than trap handling I think. That being said I suspect it would be significantly tricky, so I think we'd probably want some motivating data first to see if the optimization is worth it.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 26 2021 at 20:27):

bjorn3 commented on issue #3107:

In case of for example cg_clif there is no embedder that can catch the SIGBUS. Now in case of cg_clif most loads/stores are guaranteed to be aligned, so AlignHint is not very useful, but I can imagine that there will be other cases where it may be useful. I think at the very least cranelift-wasm should have an option to disable AlignHint emission.


Last updated: Oct 23 2024 at 20:03 UTC