summaryrefslogtreecommitdiff
path: root/src/wasm/parsing.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2023-10-26 16:19:07 -0700
committerGitHub <noreply@github.com>2023-10-26 16:19:07 -0700
commit0aa46e4ee194dd63d9348a16a0b219e548839303 (patch)
tree86e6dfa8a4275bd24783bdfe1ab74585607b465e /src/wasm/parsing.cpp
parent889422e0c92552ff484659f9b41e777ba7ab35c1 (diff)
downloadbinaryen-0aa46e4ee194dd63d9348a16a0b219e548839303.tar.gz
binaryen-0aa46e4ee194dd63d9348a16a0b219e548839303.tar.bz2
binaryen-0aa46e4ee194dd63d9348a16a0b219e548839303.zip
Allow rec groups of public function types in closed world (#6053)
Closed-world mode allows function types to escape if they are on exported functions, because that has been possible since wasm MVP and cannot be avoided. But we need to also allow all types in those type's rec groups as well. Consider this case: (module (rec (type $0 (func)) (type $1 (func)) ) (func "0" (type $0) (nop) ) (func "1" (type $1) (nop) ) ) The two exported functions make the two types public, so this module validates in closed world mode. Now imagine that metadce removes one export: (module (rec (type $0 (func)) (type $1 (func)) ) (func "0" (type $0) (nop) ) ;; The export "1" is gone. ) Before this PR that no longer validates, because it only marks the type $0 as public. But when a type is public that makes its entire rec group public, so $1 is errored on. To fix that, this PR allows all types in a rec group of an exported function's type, which makes that last module validate.
Diffstat (limited to 'src/wasm/parsing.cpp')
0 files changed, 0 insertions, 0 deletions