LibAFL
LibAFL copied to clipboard
Instrumentation filters remove generic bound
First attempt at fixing #2037
- bound for generic
S: UsesInputhas been removed forHasInstrumentationFilter - implementation of
StdInstrumentationFilterandHasInstrumentationFilterhas been removed for(QemuHelper, ())
Should we remove the bound from StdInstrumentationFilter as well?
Doesn't look like systemmode still builds here:
[cargo-make][3] INFO - Execute Command: "cargo" "build" "--profile" "dev" "--no-default-features" "--features" "std,breakpoint" "--target-dir" "/__w/LibAFL/LibAFL/target"
Compiling libafl_qemu_sys v0.12.0 (/__w/LibAFL/LibAFL/libafl_qemu/libafl_qemu_sys)
Compiling qemu_systemmode v0.12.0 (/__w/LibAFL/LibAFL/fuzzers/qemu_systemmode)
Compiling libafl_qemu v0.12.0 (/__w/LibAFL/LibAFL/libafl_qemu)
error[E0277]: the trait bound `(QemuEdgeCoverageHelper, ()): StdInstrumentationFilter<_>` is not satisfied
--> src/fuzzer_breakpoint.rs:128:27
|
128 | match emu.run(input, qemu_executor_state) {
| ^^^ the trait `StdInstrumentationFilter<_>` is not implemented for `(QemuEdgeCoverageHelper, ())`, which is required by `StdEmuExitHandler<FastSnapshotManager>: EmuExitHandler<_, _>`
|
= help: the trait `EmuExitHandler<QT, S>` is implemented for `StdEmuExitHandler<SM>`
= note: required for `StdEmuExitHandler<FastSnapshotManager>` to implement `EmuExitHandler<(QemuEdgeCoverageHelper, ()), _>`
note: required by a bound in `Emulator::<QT, S, E>::run`
--> /__w/LibAFL/LibAFL/libafl_qemu/src/emu/mod.rs:1344:8
|
1344 | E: EmuExitHandler<QT, S>,
| ^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Emulator::<QT, S, E>::run`
...
1563 | pub unsafe fn run(
| --- required by a bound in this associated function
...
yes, it breaks systemmode. I need some time to look at it better and re-implement the filters for systemmode without that generic bound.