Skip to content

Commit c17913d

Browse files
authored
Fix a pulley crash on OSS-Fuzz (bytecodealliance#9042)
This fixes a crash where the `GetSp` opcode was overwriting a special register, so apply a similar filter as to other instructions to ensure that the special registers are not clobbered.
1 parent 59961db commit c17913d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pulley/fuzz/src/interp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ fn extended_op_is_safe_for_fuzzing(op: &ExtendedOp) -> bool {
107107
match op {
108108
ExtendedOp::Trap(_) => true,
109109
ExtendedOp::Nop(_) => true,
110-
ExtendedOp::GetSp(_) => true,
110+
ExtendedOp::GetSp(GetSp { dst, .. }) => !dst.is_special(),
111111
}
112112
}

0 commit comments

Comments
 (0)