LibWasm: Skip initializing active empty data sections
This commit is contained in:
parent
65355c388b
commit
d74eca78aa
Notes:
sideshowbarker
2024-07-18 09:11:00 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/d74eca78aab Pull-request: https://github.com/SerenityOS/serenity/pull/8633 Issue: https://github.com/SerenityOS/serenity/issues/7158 Issue: https://github.com/SerenityOS/serenity/issues/8629
1 changed files with 2 additions and 0 deletions
|
@ -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()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue