wizard-engine icon indicating copy to clipboard operation
wizard-engine copied to clipboard

Wrong error message in case of validation error

Open vouillon opened this issue 11 months ago • 2 comments

Running this test program, I get the following error:

$ ./bin/wizeng.x86-linux  -ext:gc -ext:exception-handling ./print_array.wasm 
./print_array.wasm:0x3D04:Code[49]: expected 148 data segments, missing data section

We should get the following validation error instead:

 ./bin/wizeng.x86-linux  -ext:gc -ext:exception-handling ./print_array.wasm 
./print_array.wasm:0x7F82:Code[49]: expected type (ref array #0), got i32

The issue is that in case of validation error, the parsing is interrupted but the check for missing data section is still performed, overriding the previous error.

vouillon avatar Feb 03 '25 10:02 vouillon