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

Quickfix: Ignore errors when loading name subsection. (#403) #408

Merged
merged 3 commits into from
Dec 15, 2021
Merged

Quickfix: Ignore errors when loading name subsection. (#403) #408

merged 3 commits into from
Dec 15, 2021

Conversation

lwagner94
Copy link
Contributor

This a work-around for (#403).

The version of wasmparser currently in use does not support extended name sections will return an error when such an unknown subsection is encountered.
This commit is a quick work-around until wasmparser is updated to the most recent version. This is a rather big undertaking unfortunately; it requires major changes in wasm.rs since the API of wasmparser has changed quite a bit.
If I find the time, I will attempt that and create another PR.

One downside of this work-around is that ill-formed name subsections (e.g. for function names) are silently ignored, but I think this is a manageable tradeoff until wasmparser is updated. In case you disagree and don't want to merge this, this PR will at least leave some clues on how to fix the issue locally if somebody runs into the same problem I did.

The version of `wasmparser` currently in use does not
support extended name sections [1] and will return an error
when such an unknown subsection is encountered.
This commit is a quick work-around until `wasmparser`
is updated to the most recent version - which is a
rather big undertaking unfortunately.

One downside of this work-around is that ill-formed
name subsections (e.g. for function names) are
silently ignored.

[1] (https://github.com/WebAssembly/extended-name-section/blob/main/proposals/extended-name-section/Overview.md)
src/read/wasm.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@philipc philipc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@philipc philipc merged commit e45a3d1 into gimli-rs:master Dec 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants