Skip to content

Commit

Permalink
LibWasm: Skip initializing active empty data sections
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpfard committed Jul 12, 2021
1 parent 65355c3 commit d74eca7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,8 @@ InstantiationResult AbstractMachine::instantiate(Module const& module, Vector<Ex
};
return;
}
if (data.init.is_empty())
return;
auto address = main_module_instance.memories()[data.index.value()];
if (auto instance = m_store.get(address)) {
if (auto max = instance->type().limits().max(); max.has_value()) {
Expand Down

0 comments on commit d74eca7

Please sign in to comment.