Stream: git-wasmtime

Topic: wasmtime / PR #3509 Fix a panic with an invalid name section


view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 17:55):

alexcrichton opened PR #3509 from fix-panic to main:

This commit fixes a panic which can happen on a module with an invalid
name section where one of the functions named has the index u32::MAX.
Previously Wasmtime would create a new FuncIndex with the indices
found in the name section but the sentinel u32::MAX causes a panic.

Cranelift otherwise limits the number of functions through wasmparser
which has a hard limit (lower than u32::MAX) so this commit applies a
fix of only recording function names for function indices that are
actually present in the module.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 19:46):

pchickey submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 05 2021 at 20:08):

alexcrichton merged PR #3509.


Last updated: Nov 22 2024 at 17:03 UTC