-
Notifications
You must be signed in to change notification settings - Fork 107
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
Fails to build error: variable 'cons_0' set but not used
#316
Comments
To be clear, afl.rs installs fine (i.e., Can you share the project that causes the problem? |
Yup
This is a brand new project from [dependencies]
afl = "*"
url = "*" To Cargo.toml and then Using the Url fuzzer from the book here: https://rust-fuzz.github.io/book/afl/tutorial.html
use afl::fuzz;
fn main() {
fuzz!(|data: &[u8]| {
if let Ok(s) = std::str::from_utf8(data) {
let _ = url::Url::parse(&s);
}
});
} The only difference from that is I am using a specific version of the rust-toolchain by adding the following file to the crate root: [toolchain]
channel = "nightly-2022-10-28"
components = [ "rustfmt", "rust-src" ]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal" |
Could you try I think what is happening is Ideally, we would run the build script when afl.rs is being installed, but not when it is used as a dependency. However, this issue suggests there's no easy way to do that right now: rust-lang/cargo#4001 At present, I am inclined to go with @vkleen's original proposal, which was to remove the Does anyone reading this have any better ideas? |
@smoelius Yep that worked! It might be nice to make a note in the book / docs but this makes sense to me. It does cause some conflicts with check-on-save tooling like |
@mothran Earlier today, I published a new version of afl.rs that removes the Could I impose on you to install the new version and run your test again without the |
@smoelius that worked for me, Thanks! |
Thank you! |
When building a target project
cargo afl build
on the following setup I get the below error:clang version 15.0.7
LLD 15.0.7
Arch Linux 6.2.9-arch1-1
The text was updated successfully, but these errors were encountered: