-
Notifications
You must be signed in to change notification settings - Fork 830
Open
Description
The way that imports are handled in wasm-ctor.cpp is pretty unclear today. All imports must be present, but typically we raise FailToEvalException when trying to read/write them since we don't know what the import contains at the time that wasm-ctor runs. That much is fine, but the code is inconsistent in how it does this.
- For tags,
getImportedTagthrows an unreachable exception. - For memories, the tracking table isn't populated during init, so reads and writes to memories will fail saying that the imported memory doesn't exist: link.
- Functions are stubbed with unreachable (for the 'env' module, and for all modules after Stub out all imports in ctor-eval #8115).
- And tables and globals will throw FailToEvalException link.
These all correctly stop evaluation when trying to observe or write to an import, but they all do it in different ways which is confusing. We should clean up the logic here.
Metadata
Metadata
Assignees
Labels
No labels