titzer / titzer/wizard-engine

Wrong error message in case of validation error

Open
#270 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
512
Forks
51
Avg merge
7h 34m
Merged PRs (30d)
21

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running the command from the issue with the attached test.zip and compare the reported validation errors. Trace the validation/parsing path and the missing-data-section check; done means the earlier expected-type error is preserved instead of being overwritten.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.