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

libfuzzer integration doesn't seem to be working #128

Open
frewsxcv opened this issue Aug 20, 2018 · 2 comments
Open

libfuzzer integration doesn't seem to be working #128

frewsxcv opened this issue Aug 20, 2018 · 2 comments

Comments

@frewsxcv
Copy link
Member

cargo run -v target pulldown_cmark_read --fuzzer libfuzzer on master:

     Running `/Users/corey/dev/targets/target/x86_64-apple-darwin/debug/pulldown_cmark_read  /Users/corey/dev/targets/fuzzer-libfuzzer/corpus-pulldown_cmark_read /Users/corey/dev/targets/common/seeds/pulldown_cmark_read`
WARNING: Failed to find function "__sanitizer_print_stack_trace". Reason dlsym(RTLD_DEFAULT, __sanitizer_print_stack_trace): symbol not found.
WARNING: Failed to find function "__sanitizer_set_death_callback". Reason dlsym(RTLD_DEFAULT, __sanitizer_set_death_callback): symbol not found.
INFO: Seed: 20030479
INFO: Loaded 1 modules   (12902 guards): 12902 [0x10bfc9360, 0x10bfd5cf8), 
No such directory: ; exiting
Fuzzer quit

cargo run -v target pulldown_cmark_read --fuzzer libfuzzer on master after running cargo update -p libfuzzer-sys:

     Running `/Users/corey/dev/targets/target/x86_64-apple-darwin/debug/pulldown_cmark_read  /Users/corey/dev/targets/fuzzer-libfuzzer/corpus-pulldown_cmark_read /Users/corey/dev/targets/common/seeds/pulldown_cmark_read`
WARNING: Failed to find function "__sanitizer_acquire_crash_state". Reason dlsym(RTLD_DEFAULT, __sanitizer_acquire_crash_state): symbol not found.
WARNING: Failed to find function "__sanitizer_print_stack_trace". Reason dlsym(RTLD_DEFAULT, __sanitizer_print_stack_trace): symbol not found.
WARNING: Failed to find function "__sanitizer_set_death_callback". Reason dlsym(RTLD_DEFAULT, __sanitizer_set_death_callback): symbol not found.
INFO: Seed: 962144173
INFO: Loaded 1 modules   (12902 guards): 12902 [0x10bf82520, 0x10bf8eeb8), 
No such file or directory: ; exiting
Fuzzer quit

I noticed the rust-fuzz/cargo-fuzz libfuzzer flags don't match the rust-fuzz/targets libfuzzer flags. I made the rust-fuzz/targets flags match the other ones, which got rid of the symbol not found errors, but I still hit the No such file or directory: ; exiting error. No idea where this is coming from.

@frewsxcv
Copy link
Member Author

Also the Rust + libfuzzer integration is working for me for other crates, just not this one.

@evverx
Copy link

evverx commented Jun 5, 2021

Judging by "No such file or directory: ; exiting" it seems to be the same issue I ran into and fixed in #138. There I started to pass -max_total_time=0 instead of an empty string to make libFuzzer stop treating that argument as a directory.

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

No branches or pull requests

2 participants