This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Seal imports section before counting imports
ClosedPublic

Authored by sbc100 on May 22 2019, 3:34 AM.

Details

Summary

Before we can assign entries in the function of global index space
we need to know the total number of function and global imports
respectively.

To avoid programmer error this change seals that imports section before
assigned function and global index space. Any attempt to add an import
after the section is sealed will assert.

The lack this such as check caused https://reviews.llvm.org/D61876
to be reverted. I'm also trying to craft a test case the this
failure.

Diff Detail

Repository
rLLD LLVM Linker

Event Timeline

sbc100 created this revision.May 22 2019, 3:34 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2019, 3:34 AM
sbc100 added a reviewer: ruiu.May 23 2019, 2:30 AM
ruiu accepted this revision.May 23 2019, 2:32 AM

LGTM

This revision is now accepted and ready to land.May 23 2019, 2:32 AM
sbc100 updated this revision to Diff 200902.May 23 2019, 2:36 AM
  • fix tests
This revision was automatically updated to reflect the committed changes.