spec icon indicating copy to clipboard operation
spec copied to clipboard

UINT32_MAX as various index values

Open SoniEx2 opened this issue 1 year ago • 1 comments

certain wasm runtimes creatively misuse UINT32_MAX to represent alternatives, for example in exception handling implementations to differentiate catch from catch_all.

it'd perhaps be a good idea to make sure such modules are treated as invalid instead.

SoniEx2 avatar Sep 20 '24 18:09 SoniEx2

Hm, not sure how we can write tests for that without defining 4 billion tags in a single module. We would clearly run into implementation limits much earlier. And if an implementation has such limits and checks them correctly, then there actually isn't anything wrong with it using out-of-range sentinel values for something else internally.

rossberg avatar Sep 21 '24 07:09 rossberg