Repository navigation
Fix validating imported global refs - #2848
Conversation
|
@Poseidonas fix for a bug you have found. |
|
Thanks, Zoltan — and thanks for taking it upstream. That reference-type index check is an easy one to miss, so it makes sense the same gap turns up across implementations; catching it at the toolkit level is where it matters most. Glad it landed with a regression test, and happy to help however is useful. |
| ) | ||
| (;; STDERR ;;; | ||
| out/test/parse/bad-ref-globals.txt:5:42: error: reference 9997 is out of range (max: 0) in globals | ||
| (global (import "mod" "val") (ref 9997)) |
There was a problem hiding this comment.
Note: imported / not imported globals display the error location differently.
This could be fixed by passing loc instead of GetLocation():
https://github.com/WebAssembly/wabt/blob/main/src/wast-parser.cc#L1865
There are other similar cases though.
|
This issue is likely my fault. I did it when I implemented the function references proposal. |
|
Perhaps at |
Found by George Vasiliades
8364475 to
caa36e4
Compare
Found by George Vasiliades