Skip to content

Commit

Permalink
Fix a pulley crash on OSS-Fuzz (bytecodealliance#9042)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
alexcrichton authored Jul 29, 2024
1 parent 59961db commit c17913d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pulley/fuzz/src/interp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,6 @@ fn extended_op_is_safe_for_fuzzing(op: &ExtendedOp) -> bool {
match op {
ExtendedOp::Trap(_) => true,
ExtendedOp::Nop(_) => true,
ExtendedOp::GetSp(_) => true,
ExtendedOp::GetSp(GetSp { dst, .. }) => !dst.is_special(),
}
}

0 comments on commit c17913d

Please sign in to comment.