Skip to content

Commit 06357e5

Browse files
committed
least restrictions when unreachable
1 parent 1f7e875 commit 06357e5

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/tools/fuzzing/fuzzing.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2513,9 +2513,13 @@ void TranslateToFuzzReader::mutateJSBoundary() {
25132513
for (Index i = 0; i < call->operands.size(); i++) {
25142514
auto type = call->operands[i]->type;
25152515
if (type == Type::unreachable) {
2516-
// Nothing sent here, so use the declared type - what we refine to
2517-
// must still validate even though this call is unreachable.
2516+
// Nothing sent here. What we refine to must still validate, even
2517+
// though this call is unreachable. Using the non-nullable bottom type
2518+
// is valid, and has the fewest restrictions.
25182519
type = declaredParams[i];
2520+
if (type.isRef()) {
2521+
type = Type(type.getHeapType().getBottom(), NonNullable);
2522+
}
25192523
}
25202524
sent.push_back(type);
25212525
}

0 commit comments

Comments
 (0)