From 1728c3de01be22e6655a6c6efa4e4ccf5511b716 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 3 Oct 2024 10:42:29 -0700 Subject: [PATCH] Fix cranelift-fuzzgen fuzzer from TrapCode refactoring 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. --- fuzz/fuzz_targets/cranelift-fuzzgen.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fuzz/fuzz_targets/cranelift-fuzzgen.rs b/fuzz/fuzz_targets/cranelift-fuzzgen.rs index 0582b035cc1a..af82db560ac0 100644 --- a/fuzz/fuzz_targets/cranelift-fuzzgen.rs +++ b/fuzz/fuzz_targets/cranelift-fuzzgen.rs @@ -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)); }