Skip to content

Commit 6c32125

Browse files
authored
Fuzzer: Fix subtyping of bottom types when fuzzing against JS (WebAssembly#8683)
maybeRefine should refine between old and new, and we were missing a check for being refined enough when traversing all subtypes of bottom. As a result, we could un-refine, which can break if a call exists.
1 parent e9b4b4c commit 6c32125

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tools/fuzzing/fuzzing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2470,9 +2470,9 @@ void TranslateToFuzzReader::mutateJSBoundary() {
24702470
options.push_back(newHeapType);
24712471
// We cannot look at a bottom type's supers (there can be many, and the
24722472
// getSuperType() API doesn't return them), but can use
2473-
// interestingHeapSubTypes on the top.
2473+
// interestingHeapSubTypes: any subtype of old is valid.
24742474
if (newHeapType.isBottom()) {
2475-
for (auto type : interestingHeapSubTypes[newHeapType.getTop()]) {
2475+
for (auto type : interestingHeapSubTypes[oldHeapType]) {
24762476
options.push_back(type);
24772477
}
24782478
break;

0 commit comments

Comments
 (0)