mirror of https://github.com/boa-dev/boa.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
432 B
19 lines
432 B
#![no_main] |
|
|
|
mod common; |
|
|
|
use crate::common::FuzzSource; |
|
use boa_engine::{Context, JsResult, JsValue}; |
|
use libfuzzer_sys::fuzz_target; |
|
|
|
fn do_fuzz(original: FuzzSource) -> JsResult<JsValue> { |
|
let mut ctx = Context::builder() |
|
.interner(original.interner) |
|
.instructions_remaining(1 << 16) |
|
.build(); |
|
ctx.eval(&original.source) |
|
} |
|
|
|
fuzz_target!(|original: FuzzSource| { |
|
let _ = do_fuzz(original); |
|
});
|
|
|