Skip to content

Wrong error message in case of validation error #270

@vouillon

Description

@vouillon

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions