Clean up FailToEvalExceptions and import stubbing in wasm-ctor.cpp
@stevenfontanella ya está trabajando en esto.
Desde el 12/12/2025.
Evaluación
Este issue todavía no se ha evaluado.
Descripción
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 #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.
- Lenguaje dominante
- WebAssembly
- Estrellas
- 8.6k
- Forks
- 885
- Merge medio
- 2 d 1 h
- PR fusionados (30 d)
- 70
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de WebAssembly/binaryen
-
Dificultad 2/5 Medio día Aptitud para principiantes 76/100
WebAssembly/binaryen#9018 · 3 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
WebAssembly/binaryen#9123 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
WebAssembly/binaryen#9122 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
WebAssembly/binaryen#9086 · 2 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
WebAssembly/binaryen#9038 · 5 comentarios ·