Stream: general

Topic: Wasmtime linear memory bounds checks


view this post on Zulip zurr (Aug 10 2021 at 06:47):

Hello there.

Judging from how great Wasmtime's execution performance is, I assume it uses the same approach as V8 and Spidermonkey for sandboxing linear memory accesses, namely guard pages. Is this correct? If yes, is it possible to use Wasmtime without that feature and enable actual bounds checks before each linear memory access? (V8 for example has --no-wasm-trap-handler and Spidermonkey has --disable-wasm-huge-memory)

view this post on Zulip bjorn3 (Aug 10 2021 at 08:46):

You can use config.static_memory_maximum_size(0) to switch from a static heap (guard pages) to a dynamic heap (bound checks)

view this post on Zulip zurr (Aug 10 2021 at 08:51):

Ah that seems what I was looking for. I'll check it out. Thank you!


Last updated: Nov 22 2024 at 16:03 UTC