qemu fuzzer tidy

This commit is contained in:
Dominik Maier 2020-12-31 15:32:25 +01:00
parent bd7b9c021a
commit 5f27c620d0
3 changed files with 9 additions and 4 deletions

View File

@ -2,11 +2,11 @@
cargo build --release cargo build --release
cd qemu-fuzz git submodule init
git submodule update qemu_fuzz
git submodule update cd qemu-fuzz
./build_qemu_fuzz.sh ../target/release/libqemufuzzer.a ./build_qemu_fuzz.sh ../target/release/libqemufuzzer.a
cp build/qemu-x86_64 ../qemu_fuzz cp build/qemu-x86_64 ../qemu_fuzz

Binary file not shown.

View File

@ -59,7 +59,7 @@ pub extern "C" fn fuzz_main_loop() {
let mut generator = RandPrintablesGenerator::new(32); let mut generator = RandPrintablesGenerator::new(32);
let stats = SimpleStats::new(|s| println!("{}", s)); let stats = SimpleStats::new(|s| println!("{}", s));
let mut mgr = LlmpEventManager::new_on_port(1337, stats).unwrap(); let mut mgr = LlmpEventManager::new_on_port_std(1337, stats).unwrap();
if mgr.is_broker() { if mgr.is_broker() {
println!("Doing broker things."); println!("Doing broker things.");
mgr.broker_loop().unwrap(); mgr.broker_loop().unwrap();
@ -100,3 +100,8 @@ pub extern "C" fn fuzz_main_loop() {
#[cfg(feature = "std")] #[cfg(feature = "std")]
println!("OK"); println!("OK");
} }
#[no_mangle]
extern "C" {
fn main();
}