Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a panic with an invalid name section #3509

Merged
merged 1 commit into from
Nov 5, 2021

Commits on Nov 5, 2021

  1. Fix a panic with an invalid name section

    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.
    alexcrichton committed Nov 5, 2021
    Configuration menu
    Copy the full SHA
    547d9fc View commit details
    Browse the repository at this point in the history