wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

What's the difference between bound check of fast interpreter mode and bound check of classic interpreter mode

Open WenLY1 opened this issue 1 year ago • 2 comments

The bound check of classic interpreter mode will do extra work if WASM_ENABLE_MEMORY64 is enabled https://github.com/bytecodealliance/wasm-micro-runtime/blob/9b9e938bee7b41f026fa9aeee988a5bfc63d55ed/core/iwasm/interpreter/wasm_interp_classic.c#L89-L102

In fast interp mode, bound check does not do extra work if WASM_ENABLE_MEMORY64 is enabled https://github.com/bytecodealliance/wasm-micro-runtime/blob/9b9e938bee7b41f026fa9aeee988a5bfc63d55ed/core/iwasm/interpreter/wasm_interp_fast.c#L40-L62

Why the bound check of fast interp mdoe is different from that of classic mode?

WenLY1 avatar Jun 20 '24 08:06 WenLY1

The fast interp mode hasn't supported the memory64 proposal yet, so the boundary check is unmodified and won't check the overflow condition that only occurs in memory64

TianlongLiang avatar Jul 01 '24 02:07 TianlongLiang

The fast interp mode hasn't supported the memory64 proposal yet, so the boundary check is unmodified and won't check the overflow condition that only occurs in memory64 Thanks, got it

WenLY1 avatar Jul 03 '24 06:07 WenLY1