We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 334de91 commit 9e88bbfCopy full SHA for 9e88bbf
src/tools/wasm-ctor-eval.cpp
@@ -482,9 +482,15 @@ struct CtorEvalExternalInterface : EvallingModuleRunner::ExternalInterface {
482
}
483
484
void applyMemoryToModule() {
485
+ if (wasm->memories.empty()) {
486
+ return;
487
+ }
488
// Memory must have already been flattened into the standard form: one
489
// segment at offset 0, or none.
490
auto& memory = wasm->memories[0];
491
+ if (memory->imported()) {
492
493
494
if (wasm->dataSegments.empty()) {
495
Builder builder(*wasm);
496
auto curr = builder.makeDataSegment();
0 commit comments