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 broken version check on metadata section #841

Merged
merged 1 commit into from
May 14, 2018
Merged

Conversation

sbc100
Copy link
Member

@sbc100 sbc100 commented May 14, 2018

No description provided.

@sbc100 sbc100 requested a review from binji May 14, 2018 22:10
@@ -1459,7 +1459,7 @@ Result BinaryReader::ReadLinkingSection(Offset section_size) {
CALLBACK(BeginLinkingSection, section_size);
uint32_t version;
CHECK_RESULT(ReadU32Leb128(&version, "version"));
ERROR_UNLESS(version = 1, "invalid linking metadata version");
ERROR_UNLESS(version == 1, "invalid linking metadata version: %u", version);
Copy link
Member

Choose a reason for hiding this comment

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

brutal!

@sbc100 sbc100 merged commit 17352a0 into master May 14, 2018
@binji binji deleted the fix_version_check branch May 14, 2018 22:29
@shepmaster
Copy link

shepmaster commented May 16, 2018

Howdy! This exposes an error when using WASM generated by Rust:

error: invalid linking metadata version: 3

Is there a flag I should be using for this? We are using

wasm2wat \
    --fold-exprs \
    --generate-names \
    --inline-exports \

@shepmaster
Copy link

Perhaps related to the discussion in #838

@sbc100
Copy link
Member Author

sbc100 commented May 16, 2018

Yes, you may be able to use --ignore-custom-section-errors. The problem should fix itself once Rust pulls in a new llvm version.

@shepmaster
Copy link

Hmm, the flag doesn't seem to take effect; perhaps I'm doing something wrong?

$ wasm2wat --help | grep ignore-custom
      --ignore-custom-section-errors          Ignore errors in custom sections

$ wasm2wat --fold-exprs --generate-names --inline-exports --ignore-custom-section-errors -o /tmp/out.wat target/wasm32-unknown-unknown/debug/playground.wasm.gc
002f892: error: invalid linking metadata version: 3

@shepmaster
Copy link

Moved discussion to #842.

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.

3 participants