Skip to content

Commit

Permalink
Add code to run as JIT, but disable for now
Browse files Browse the repository at this point in the history
Signed-off-by: Alan Jowett <alanjo@microsoft.com>
  • Loading branch information
Alan-Jowett committed May 5, 2024
1 parent 6a7ced3 commit 8940dc9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions libfuzzer/libfuzz_harness.cc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,19 @@ int LLVMFuzzerTestOneInput(const uint8_t* data, std::size_t size)
return 0;
}

// TODO: Enable executing the BPF code via JIT.
// This is blocked on an unknown issue that causes code to pass when run via
// the interpreter, but fail when run via the JIT.
//
// auto fn = ubpf_compile(vm, &error_message);
// if (fn == nullptr) {
// free(error_message);
// ubpf_destroy(vm);
// return 0;
// }

// fn(memory.data(), memory.size());

ubpf_destroy(vm);

return 0; // Non-zero return values are reserved for future use.
Expand Down

0 comments on commit 8940dc9

Please sign in to comment.