WebAssembly / spec

WebAssembly specification, reference interpreter, and test suite.
https://webassembly.github.io/spec/
Other
3.13k stars 445 forks source link

Question about validation of {element, data} segments #1711

Closed r1ru closed 5 months ago

r1ru commented 10 months ago

The spec tells that we have to validate element and data segments under context C' defined as follows.

context_C

However, that means the active element and data segments are always invalid, because C'.tables and C'.mems are always empty. Is this a specification error? Or am I missing something?

validate_elemet_segment

validate_data

rossberg commented 10 months ago

Thanks, that's definitely a bug. Please see #1712 for a fix.