tommie

Results 112 comments of tommie

Trying small values of `--stack-size` allows this tiny repro: https://gist.github.com/tommie/04d77358c4006df94106f8e63a71cfec * It's only using `i32`. * It fails on the first instruction with stack sizes 20-27. * Stack size 28-51...

I'd think this should have caused other stack corruption issues, so I'm not 100% sure I understand the issue. At least superficially, it makes sense. If the stack slots have...

> I'd think this should have caused other stack corruption issues, so I'm not 100% sure I understand the issue. At least superficially, it makes sense. My fix failed for...

> Still, I'm not an expert in wasm3 Me neither. :) Thanks for corroborating the root cause. Makes it a bit more likely the fix is correct.

wasm2wat, tons of errors like: wasm3-poc-11:0000285: error: type mismatch in call, expected [f32] but got [f64] In Debug, I get compile | 2006 | 0x10 .. call compile | |...

I agree: https://rgambord.github.io/c99-doc/sections/7/17/index.html#p3

So this is when the linker creates a name section without really needing one. Or someone manually crafting it. Seems like a good idea to fix.

wasm2wat: ``` wasm3-poc-06.wasm:00000a7: error: type mismatch in i64.shr_s, expected [i64, i64] but got [f32, f32] wasm3-poc-06.wasm:00000a8: error: type mismatch in block, expected [f32] but got [i64] ``` compile log: ```...

wasm2wat: ``` wasm3-poc-09:0000044: error: type mismatch in f64.sqrt, expected [f64] but got [... i32] wasm3-poc-09:000004a: error: type mismatch in memory.copy, expected [i32, i32, i32] but got [i32, f64, i32] ```...

This is because of the use of recursive calls to process the next instruction, and op_Loop is not using a tail call: https://github.com/wasm3/wasm3/blob/35b5e2fb53c5cbc1ff3d7e42c381cd7cfa14f308/source/m3_exec.h#L876-L894 Smaller repro: https://gist.github.com/tommie/ab4f29aadb1120564f2954b09a3857ac This fails even at...