bnjbvr commented on Issue #1096:
As https://github.com/bytecodealliance/wasmtime/pull/1930 may land soon, and Spectre mitigations will be enabled by default as part of this patch, embedders who are using explicit bounds checks for heaps should be aware that there's going to be a small performance cost implied by this, and that they might want to disable the spectre checks if their environment makes it safe to do so.
While we don't have precise numbers, the overhead should be pretty small (generate one immediate + one conditional move based for each heap bounds checks). It is possible to disable it, if the embedder's environment is safe under Spectre attacks (e.g. each wasm runs its own process); set the Cranelift setting
enable_heap_access_spectre_mitigation
to false, in this case.
Last updated: Nov 22 2024 at 17:03 UTC