Skip to content

Commit 5340051

Browse files
authored
fix qemu_linux_process example (#3393)
* fix qemu_linux_process example * clippy
1 parent 61b6023 commit 5340051

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

crates/libafl_qemu/src/emu/drivers/nyx.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub struct NyxEmulatorDriver {
2828
allow_page_on_start: bool, // when fuzzing starts, all modules will only accept the current page table
2929
#[builder(default = false)]
3030
print_commands: bool,
31-
#[builder(default = (1024 * 1024))]
31+
#[builder(default = 1024 * 1024)]
3232
max_input_size: usize,
3333
}
3434

fuzzers/full_system/qemu_linux_process/Justfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ linux_builder_dir: target_dir
2020
compile_target api="lqemu": (build api)
2121
clang -O0 -static -I {{ BUILD_DIR }}/include \
2222
example/harness_{{ api }}.c \
23-
-o {{ LINUX_BUILDER_DIR }}/runtime/harness
23+
-o {{ LINUX_BUILDER_DIR }}/hooks/runtime/harness
2424

2525
update_files api="lqemu": target_dir linux_builder_dir (build api)
26-
cp -r setup/* "{{ LINUX_BUILDER_DIR }}/setup/"
27-
cp -r runtime/* "{{ LINUX_BUILDER_DIR }}/runtime/"
26+
cp -r setup/* "{{ LINUX_BUILDER_DIR }}/hooks/setup/"
27+
cp -r runtime/* "{{ LINUX_BUILDER_DIR }}/hooks/runtime/"
2828

2929
cp {{ BUILD_DIR }}/include/* "{{ LINUX_BUILDER_DIR }}/setup/"
3030

31-
target api="lqemu": linux_builder_dir update_files
31+
target api="lqemu": linux_builder_dir compile_target update_files
3232
{{LINUX_BUILDER_DIR}}/build.sh
3333

3434
build api="lqemu":
@@ -71,4 +71,4 @@ run api="lqemu": (build api)
7171
test: build (build "nyx")
7272

7373
clean:
74-
cargo clean
74+
cargo clean

fuzzers/full_system/qemu_linux_process/src/fuzzer.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub fn fuzz() {
173173
TimeFeedback::new(&time_observer)
174174
);
175175

176-
let map_feedback = MaxMapFeedback::new(&edges_observer);
176+
let map_feedback = MaxMapFeedback::with_name("edges_objective", &edges_observer);
177177

178178
// A feedback to choose if an input is a solution or not
179179
let mut objective = feedback_and_fast!(
@@ -218,7 +218,6 @@ pub fn fuzz() {
218218
timeout,
219219
)
220220
.expect("Failed to create QemuExecutor");
221-
222221
// Instead of calling the timeout handler and restart the process, trigger a breakpoint ASAP
223222
executor.break_on_timeout();
224223

0 commit comments

Comments
 (0)