Skip to content

Commit

Permalink
Fixes fuzz_targets.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lichtso committed May 18, 2024
1 parent 6921231 commit d021f46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion fuzz/fuzz_targets/smart_jit_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ fuzz_target!(|data: FuzzData| {
#[allow(unused)]
let (_interp_ins_count, interp_res) = interp_vm.execute_program(&executable, true);

#[cfg(all(feature = "jit", not(target_os = "windows"), target_arch = "x86_64"))]
#[cfg(all(not(target_os = "windows"), target_arch = "x86_64"))]
if executable.jit_compile().is_ok() {
let mut jit_mem = data.mem;
let mut jit_context_object = TestContextObject::new(1 << 16);
Expand Down
6 changes: 3 additions & 3 deletions fuzz/fuzz_targets/smarter_jit_diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fuzz_target!(|data: FuzzData| {
#[allow(unused)]
let (_interp_ins_count, interp_res) = interp_vm.execute_program(&executable, true);

#[cfg(all(feature = "jit", not(target_os = "windows"), target_arch = "x86_64"))]
#[cfg(all(not(target_os = "windows"), target_arch = "x86_64"))]
if executable.jit_compile().is_ok() {
let mut jit_mem = data.mem;
let mut jit_context_object = TestContextObject::new(1 << 16);
Expand All @@ -85,8 +85,8 @@ fuzz_target!(|data: FuzzData| {
let (_jit_ins_count, jit_res) = jit_vm.execute_program(&executable, false);
if format!("{:?}", interp_res) != format!("{:?}", jit_res) {
// spot check: there's a meaningless bug where ExceededMaxInstructions is different due to jump calculations
if interp_res_str.contains("ExceededMaxInstructions")
&& jit_res_str.contains("ExceededMaxInstructions")
if format!("{:?}", interp_res).contains("ExceededMaxInstructions")
&& format!("{:?}", jit_res).contains("ExceededMaxInstructions")
{
return;
}
Expand Down

0 comments on commit d021f46

Please sign in to comment.