Closed BABA3344 closed 1 month ago
Hi @BABA3344, sorry for the late reply. I use 1.76.0-nightly
The previous issues disappeared after using the 1.76.0-nightly version of Rust, but new issues have emerged.
Could you please upload the Cargo.lock file to the repository?
Because there are several version conflicts.
Could you please show the error logs?
After using Rust version 1.76.0-nightly, the previous errors disappeared, but these new errors have emerged.
error[E0432]: unresolved import `libafl::prelude::HasClientPerfMonitor`
--> \Midas\src\evm\concolic\concolic_stage.rs:15:15
|
15 | CorpusId, HasClientPerfMonitor, HasMetadata, ObserversTuple, Stage, UsesInput,
| ^^^^^^^^^^^^^^^^^^^^
| |
| no `HasClientPerfMonitor` in `prelude`
| help: a similar name exists in the module: `ClientPerfMonitor`
error[E0432]: unresolved import `libafl::prelude::HasClientPerfMonitor`
--> \Midas\src\evm\cov_stage.rs:21:33
|
21 | use libafl::prelude::{CorpusId, HasClientPerfMonitor, HasMetadata, ObserversTuple, Stage};
| ^^^^^^^^^^^^^^^^^^^^
| |
| no `HasClientPerfMonitor` in `prelude`
| help: a similar name exists in the module: `ClientPerfMonitor`
error[E0432]: unresolved import `libafl::state::HasClientPerfMonitor`
--> \Midas\src\evm\feedbacks.rs:14:5
|
14 | use libafl::state::HasClientPerfMonitor;8
| ^^^^^^^^^^^^^^^--------------------
| | |
| | help: a similar name exists in the module: `MaybeHasClientPerfMonitor`
| no `HasClientPerfMonitor` in `state`
In an attempt to fix the error, I added the [introspection] feature to libafl:
libafl = { version = "0.11.1", features = ["introspection"] }
After that, the previous errors disappeared, but new errors emerged
error[E0277]: the trait bound `S: libafl::state::State` is not satisfied
--> \Midas\src\evm\concolic\concolic_stage.rs:204:15
|
204 | impl<I, S, F> Feedback<S> for ConcolicFeedbackWrapper<F>
| ^^^^^^^^^^^ the trait `libafl::state::State` is not implemented for `S`
|
note: required by a bound in `Feedback`
--> .cargo\registry\src\index.crates.io-6f17d22bba15001f\libafl-0.11.1\src\feedbacks\mod.rs:51:8
|
49 | pub trait Feedback<S>: Named
| -------- required by a bound in this trait
50 | where
51 | S: State,
| ^^^^^ required by this bound in `Feedback`
help: consider further restricting this bound
|
208 | S: HasClientPerfMonitor + HasMetadata + HasCorpus + UsesInput<Input = I> + libafl::state::State,
| ++++++++++++++++++++++
error[E0277]: the trait bound `S: libafl::state::State` is not satisfied
--> \Midas\src\evm\concolic\concolic_stage.rs:207:8
|
207 | F: Feedback<S> + Named + Debug,
| ^^^^^^^^^^^ the trait `libafl::state::State` is not implemented for `S`
|
note: required by a bound in `Feedback`
--> .cargo\registry\src\index.crates.io-6f17d22bba15001f\libafl-0.11.1\src\feedbacks\mod.rs:51:8
|
49 | pub trait Feedback<S>: Named
| -------- required by a bound in this trait
50 | where
51 | S: State,
| ^^^^^ required by this bound in `Feedback`
help: consider further restricting this bound
|
208 | S: HasClientPerfMonitor + HasMetadata + HasCorpus + UsesInput<Input = I> + libafl::state::State,
| ++++++++++++++++++++++
error[E0277]: the trait bound `S: libafl::state::State` is not satisfied
--> \Midas\src\fuzzer.rs:75:8
|
75 | F: Feedback<S>,
| ^^^^^^^^^^^ the trait `libafl::state::State` is not implemented for `S`
|
note: required by a bound in `Feedback`
--> .cargo\registry\src\index.crates.io-6f17d22bba15001f\libafl-0.11.1\src\feedbacks\mod.rs:51:8
|
49 | pub trait Feedback<S>: Named
| -------- required by a bound in this trait
50 | where
51 | S: State,
| ^^^^^ required by this bound in `Feedback`
help: consider further restricting this bound
|
80 | S: HasClientPerfMonitor + HasCorpus + HasRand + HasMetadata + UsesInput<Input = I> + libafl::state::State,
I believe the issue might be related to different versions. Maybe attaching the Cargo.lock file could help resolve these errors .
Please check: Cargo.lock.zip
Unfortunately, the errors did not disappear even after using the Cargo.lock file.
Compiling serde_traitobject v0.2.8
Compiling revm v3.3.0 (https://github.com/fuzzland/revm?rev=91f3a4cc2762d0b45ab88f48faa6a7c39fa84f84#91f3a4cc)
Compiling heimdall-core v0.6.1 (https://github.com/fuzzland/heimdall-rs.git#3d95f041)
error[E0432]: unresolved import `core::simd::SimdOrd`
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:8:5
|
8 | use core::simd::SimdOrd;
| ^^^^^^^^^^^^^^^^^^^ no `SimdOrd` in `simd`
|
help: consider importing one of these items instead
|
8 | use core::simd::prelude::SimdOrd;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | use crate::prelude::std::simd::prelude::SimdOrd;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 | use std::simd::prelude::SimdOrd;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~
Compiling clap v4.5.17
Compiling handlebars v4.5.0
Compiling nix v0.24.3
Compiling permutator v0.4.3
Compiling itertools v0.10.5
Compiling retry v2.0.0
error[E0599]: no associated item named `LANES` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:550:40
|
550 | let steps = size / VectorType::LANES;
| ^^^^^ associated item not found in `Simd<u8, 16>`
error[E0599]: no associated item named `LANES` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:551:39
|
551 | let left = size % VectorType::LANES;
| ^^^^^ associated item not found in `Simd<u8, 16>`
error[E0599]: no associated item named `LANES` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:556:44
|
556 | let i = step * VectorType::LANES;
| ^^^^^ associated item not found in `Simd<u8, 16>`
error[E0599]: no method named `simd_max` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:560:26
|
560 | if items.simd_max(history) != history {
| ^^^^^^^^ method not found in `Simd<u8, 16>`
--> /rustc/06e02d5b259c1e88cbf0c74366d9e0a4c7cfd6d9/library/core/src/../../portable-simd/crates/core_simd/src/simd/cmp/ord.rs:31:8
|
= note: the method is available for `Simd<u8, 16>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
3 + use core::simd::cmp::SimdOrd;
|
error[E0599]: no associated item named `LANES` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:563:54
|
563 | for j in i..(i + VectorType::LANES) {
| ^^^^^ associated item not found in `Simd<u8, 16>`
error[E0599]: no associated item named `LANES` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:584:44
|
584 | let i = step * VectorType::LANES;
| ^^^^^ associated item not found in `Simd<u8, 16>`
error[E0599]: no method named `simd_max` found for struct `Simd` in the current scope
--> /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libafl-0.11.1/src/feedbacks/map.rs:588:26
|
588 | if items.simd_max(history) != history {
| ^^^^^^^^ method not found in `Simd<u8, 16>`
--> /rustc/06e02d5b259c1e88cbf0c74366d9e0a4c7cfd6d9/library/core/src/../../portable-simd/crates/core_simd/src/simd/cmp/ord.rs:31:8
|
= note: the method is available for `Simd<u8, 16>` here
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
|
3 + use core::simd::cmp::SimdOrd;
|
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `libafl` (lib) due to 8 previous errors
I am experiencing the same errors as @BABA3344
I also tried the most recent version of cargo and following the guides from the rust compiler. However, I could not compile this project. In addition, the cargo version specified in the repository is 1.74.0-nightly
, which is not the version specified in this thread (1.76.0-nightly
).
@MingxiYe Could you check that the current repository compiles?
Hi @BABA3344 @vilotgit, thank you for bringing forward the issues. Please check the latest commit and see if it works.
I was able to compile and run with the latest commit (by the way, the output binary is ./metafuzz
not ./Midas
).
Thank you for the fast response! 😄
Thank you. Apologize for the typo, as it is a preliminary version. We are planning to bring forward a production tool soon, please follow up.
rustc --version rustc 1.83.0-nightly (28e8f01c2 2024-09-17) cargo build --release
Could you let me know which Rust version or Nightly build you're currently using to development?