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

afl binary cannot be built #406

Closed
yongmandooo opened this issue Aug 9, 2023 · 1 comment · Fixed by #412
Closed

afl binary cannot be built #406

yongmandooo opened this issue Aug 9, 2023 · 1 comment · Fixed by #412

Comments

@yongmandooo
Copy link

yongmandooo commented Aug 9, 2023

after "cargo afl build", there is an error.

Compiling png-afl v0.2.0 (/home/kym000131/fuzzing_set/Rust/image-png/png-afl) error: declaration of ano_mangle` function
--> src/main.rs:11:1
|
11 | #[no_mangle]
| ^^^^^^^^^^^^
|
= note: the linker's behavior with multiple libraries exporting duplicate symbol names is undefined and Rust cannot provide guarantees when you manually override them
note: the lint level is defined here
--> src/main.rs:2:11
|
2 | #![forbid(unsafe_code)]
| ^^^^^^^^^^^

error[E0308]: mismatched types
--> src/main.rs:19:9
|
19 | let (info, mut reader) = decoder.read_info().map_err(|| ())?;
| ^^^^^^^^^^^^^^^^^^ ------------------------------------ this expression has type Reader<&[u8]>
| |
| expected Reader<&[u8]>, found (_, _)
|
= note: expected struct Reader<&[u8]>
found tuple `(
, _)``

I think there is a problem in png-afl/src/main.rs

@whtsht
Copy link
Contributor

whtsht commented Sep 5, 2023

Since detect_odr_violations=0 is now set by default, you can delete the code that causes the first error.

The second mismatched types error easy to fix.

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

Successfully merging a pull request may close this issue.

3 participants