Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SnapshotModule to qemu_launcher #2887

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

WorksButNotTested
Copy link
Collaborator

I've put this together, but it seems to crash after a while when run with...

/workspaces/LibAFL/fuzzers/binary_only/qemu_launcher/target/x86_64/release/qemu_launcher-x86_64 \
  --input ./corpus \
  --output /workspaces/LibAFL/fuzzers/binary_only/qemu_launcher/target/x86_64/output/ \
  --log /workspaces/LibAFL/fuzzers/binary_only/qemu_launcher/target/x86_64/output/log.txt \
  --cores 0-4 \
  --snapshots \
  --iterations 1000 \
  --verbose \
  -- \
  /workspaces/LibAFL/fuzzers/binary_only/qemu_launcher/target/x86_64/libpng-harness-x86_64

@domenukk domenukk requested a review from rmalmain January 27, 2025 00:18
@domenukk
Copy link
Member

Clippy is still complaining

warning: unused import: `libafl_qemu_sys::GuestAddr`
 --> libafl_qemu/src/modules/mod.rs:5:5
  |
5 | use libafl_qemu_sys::GuestAddr;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error: this `else { if .. }` block can be collapsed
   --> libafl_qemu/src/modules/usermode/snapshot.rs:742:16
    |
742 |           } else {
    |  ________________^
743 | |             if self.auto_reset {
744 | |                 self.reset(qemu);
745 | |             }
746 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
    = note: `-D clippy::collapsible-else-if` implied by `-D clippy::all`
    = help: to override `-D clippy::all` add `#[allow(clippy::collapsible_else_if)]`
help: collapse nested if block
    |
742 ~         } else if self.auto_reset {
743 +             self.reset(qemu);
744 +         }
    |

    Checking libafl_intelpt v0.15.0 (/home/runner/work/LibAFL/LibAFL/libafl_intelpt)
warning: this lint expectation is unfulfilled
   --> libafl_qemu/src/executor.rs:305:10
    |
305 | #[expect(clippy::type_complexity)]
    |          ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unfulfilled_lint_expectations)]` on by default

@@ -732,7 +740,9 @@ where
if self.empty {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think in the long run we want to completely remove this and leave this job to EmulatorDriver

@@ -334,12 +439,39 @@ impl<M: Monitor> Instance<'_, M> {
println!("We imported {} inputs from disk.", state.corpus().count());
}

/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't think we should duplicate this comment. maybe put this as a module-level documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants