diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/binary-reader-interp.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/binary-reader-interp.cc b/src/binary-reader-interp.cc index d053b325..10180e2a 100644 --- a/src/binary-reader-interp.cc +++ b/src/binary-reader-interp.cc @@ -624,7 +624,9 @@ wabt::Result BinaryReaderInterp::AppendExport(Module* module, ExternalKind kind, Index item_index, string_view name) { - if (module->export_bindings.FindIndex(name) != kInvalidIndex) { + // Host modules are allowed to have duplicated exports; e.g. "spectest.print" + if (isa<DefinedModule>(module) && + module->export_bindings.FindIndex(name) != kInvalidIndex) { PrintError("duplicate export \"" PRIstringview "\"", WABT_PRINTF_STRING_VIEW_ARG(name)); return wabt::Result::Error; |