diff options
Diffstat (limited to 'src/shell-interface.h')
-rw-r--r-- | src/shell-interface.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shell-interface.h b/src/shell-interface.h index ad553441f..6c6961541 100644 --- a/src/shell-interface.h +++ b/src/shell-interface.h @@ -97,6 +97,9 @@ struct ShellExternalInterface : ModuleInstance::ExternalInterface { memory.resize(wasm.memory.initial * wasm::Memory::kPageSize); // apply memory segments for (auto& segment : wasm.memory.segments) { + if (segment.isPassive) { + continue; + } Address offset = (uint32_t)ConstantExpressionRunner<TrivialGlobalManager>(instance.globals).visit(segment.offset).value.geti32(); if (offset + segment.data.size() > wasm.memory.initial * wasm::Memory::kPageSize) { trap("invalid offset when initializing memory"); |