Browse Source

Merge pull request #2284 from alexcrichton/fix-interrupts

Fix enabling interrupts in fuzzers
pull/2292/head
Nick Fitzgerald 4 years ago
committed by GitHub
parent
commit
4fd90dccab
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      crates/fuzzing/src/oracles.rs

2
crates/fuzzing/src/oracles.rs

@ -66,11 +66,11 @@ pub fn instantiate(wasm: &[u8], strategy: Strategy) {
pub fn instantiate_with_config(wasm: &[u8], mut config: Config, timeout: Option<Duration>) {
crate::init_fuzzing();
config.interruptable(timeout.is_some());
let engine = Engine::new(&config);
let store = Store::new(&engine);
if let Some(timeout) = timeout {
config.interruptable(true);
let handle = store.interrupt_handle().unwrap();
std::thread::spawn(move || {
std::thread::sleep(timeout);

Loading…
Cancel
Save