summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 2d00c4b67..3baaacb16 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -3726,8 +3726,12 @@ static void validateClosedWorldInterface(Module& module, ValidationInfo& info) {
}
}
+ // Ignorable public types are public, but we can ignore them for purposes of
+ // erroring here: It is always ok that they are public.
+ auto ignorable = getIgnorablePublicTypes();
+
for (auto type : ModuleUtils::getPublicHeapTypes(module)) {
- if (!publicFuncTypes.count(type)) {
+ if (!publicFuncTypes.count(type) && !ignorable.count(type)) {
auto name = type.toString();
if (auto it = module.typeNames.find(type); it != module.typeNames.end()) {
name = it->second.name.toString();