Skip to content

Commit

Permalink
Fix cranelift-fuzzgen fuzzer from TrapCode refactoring (#9362)
Browse files Browse the repository at this point in the history
This commit fixes an issue found on OSS-Fuzz for the cranelift-fuzzgen
fuzzer which was caused by #9338 but that PR forgot to fix.
  • Loading branch information
alexcrichton authored Oct 3, 2024
1 parent 80ed395 commit 8e4ed6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fuzz/fuzz_targets/cranelift-fuzzgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@ impl Default for Statistics {
// Pre-Register all trap codes since we can't modify this hashmap atomically.
let mut run_result_trap = HashMap::new();
run_result_trap.insert(CraneliftTrap::Debug, AtomicU64::new(0));
run_result_trap.insert(CraneliftTrap::BadSignature, AtomicU64::new(0));
run_result_trap.insert(CraneliftTrap::UnreachableCodeReached, AtomicU64::new(0));
run_result_trap.insert(CraneliftTrap::HeapMisaligned, AtomicU64::new(0));
for trapcode in TrapCode::non_user_traps() {
run_result_trap.insert(CraneliftTrap::User(*trapcode), AtomicU64::new(0));
}
Expand Down

0 comments on commit 8e4ed6e

Please sign in to comment.