Skip to content

Commit 64ab851

Browse files
committed
fix logic bug with ||,&& when deciding to emit a null. only emit a null when nullable..
1 parent 0d3b16a commit 64ab851

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/tools/fuzzing/fuzzing.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3470,7 +3470,8 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) {
34703470
return makeRefFuncConst(type);
34713471
}
34723472
case HeapType::cont: {
3473-
if (type.isNullable() || oneIn(4)) {
3473+
// Most of the time, avoid null continuations, as they will trap.
3474+
if (type.isNullable() && oneIn(4)) {
34743475
return builder.makeRefNull(HeapTypes::cont.getBasic(share));
34753476
}
34763477
// Emit the simplest possible continuation.

0 commit comments

Comments
 (0)