-
Notifications
You must be signed in to change notification settings - Fork 42
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
Cleanup output if version mismatch. #4
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks! |
bors bot
added a commit
that referenced
this pull request
Apr 26, 2018
4: Cleanup output if version mismatch. r=PaulGrandperrin a=frewsxcv If there's a version mismatch, this is what is outputted: ``` process didn't exit successfully: `/Users/corey/dev/targets/fuzzer-honggfuzz/hfuzz_target/release/build/honggfuzz-32eedb7c8be2fdad/build-script-build` (exit code: 101) --- stderr thread 'main' panicked at 'hongfuzz dependency (0.5.19) and build command (0.5.7) versions do not match', /Users/corey/.cargo/registry/src/github.com-1ecc6299db9ec823/honggfuzz-0.5.19/build.rs:24:5 note: Run with `RUST_BACKTRACE=1` for a backtrace. ``` Seems like we can just print the error instead of doing the panic message dance. Co-authored-by: Corey Farwell <coreyf@rwell.org>
Build succeeded |
eddyp
added a commit
to upstreaming/honggfuzz-rs
that referenced
this pull request
Jun 14, 2020
* Add liblzma-dev in the list of prerequisites (found as needed on Debian 9 Stretch) - fixes rust-fuzz#38 * Fix incorrect instructions on how to run run-debug session. With the provided instructions the follwing error appears: eddy@aptonia:~/usr/src/rust/learn-rust/fuzz/honggfuzz-rs/example-honggfuzz-rs $ cargo hfuzz run-debug example hfuzz_workspace/*.fuzz /usr/bin/ld.gold Finished dev [unoptimized + debuginfo] target(s) in 0.04s bind: Invalid command `enable-meta-key'. (lldb) command script import "/home/eddy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py" (lldb) type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust (lldb) type category enable Rust (lldb) target create "hfuzz_target/x86_64-unknown-linux-gnu/debug/example" Current executable set to 'hfuzz_target/x86_64-unknown-linux-gnu/debug/example' (x86_64). (lldb) b rust_panic Breakpoint 1: where = example`rust_panic + 19, address = 0x000000000001cc23 (lldb) r error: failed to open "hfuzz_workspace/*.fuzz" ... Instead, with the proposed (more copy-paste friendly) command we get: eddy@aptonia:~/usr/src/rust/learn-rust/fuzz/honggfuzz-rs/example-honggfuzz-rs $ cargo hfuzz run-debug example hfuzz_workspace/*/*.fuzz /usr/bin/ld.gold Finished dev [unoptimized + debuginfo] target(s) in 0.02s bind: Invalid command `enable-meta-key'. (lldb) command script import "/home/eddy/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/etc/lldb_rust_formatters.py" (lldb) type summary add --no-value --python-function lldb_rust_formatters.print_val -x ".*" --category Rust (lldb) type category enable Rust (lldb) target create "hfuzz_target/x86_64-unknown-linux-gnu/debug/example" Current executable set to 'hfuzz_target/x86_64-unknown-linux-gnu/debug/example' (x86_64). (lldb) b rust_panic Breakpoint 1: where = example`rust_panic + 19, address = 0x000000000001cc23 (lldb) r thread 'main' panicked at 'BOOM', src/main.rs:23:13 stack backtrace: 0: backtrace::backtrace::libunwind::trace at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/libunwind.rs:86 1: backtrace::backtrace::trace_unsynchronized at /cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.44/src/backtrace/mod.rs:66 2: std::sys_common::backtrace::_print_fmt at src/libstd/sys_common/backtrace.rs:78 3: <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt at src/libstd/sys_common/backtrace.rs:59 4: core::fmt::write at src/libcore/fmt/mod.rs:1063 5: std::io::Write::write_fmt at src/libstd/io/mod.rs:1426 6: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:62 7: std::sys_common::backtrace::print at src/libstd/sys_common/backtrace.rs:49 8: std::panicking::default_hook::{{closure}} at src/libstd/panicking.rs:204 9: std::panicking::default_hook at src/libstd/panicking.rs:224 10: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:470 11: std::panicking::begin_panic at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/panicking.rs:397 12: example::main::{{closure}} at src/main.rs:23 13: honggfuzz::fuzz at /home/eddy/.cargo/registry/src/github.com-1ecc6299db9ec823/honggfuzz-0.5.49/src/lib.rs:329 14: example::main at src/main.rs:15 15: std::rt::lang_start::{{closure}} at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/rt.rs:67 16: std::rt::lang_start_internal::{{closure}} at src/libstd/rt.rs:52 17: std::panicking::try::do_call at src/libstd/panicking.rs:303 18: __rust_maybe_catch_panic at src/libpanic_unwind/lib.rs:86 19: std::panicking::try at src/libstd/panicking.rs:281 20: std::panic::catch_unwind at src/libstd/panic.rs:394 21: std::rt::lang_start_internal at src/libstd/rt.rs:51 22: std::rt::lang_start at /rustc/8d69840ab92ea7f4d323420088dd8c9775f180cd/src/libstd/rt.rs:67 23: main 24: __libc_start_main 25: _start note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. Process 20748 stopped * thread rust-fuzz#1: tid = 20748, 0x0000555555570c23 example`rust_panic + 19 at panicking.rs:522, name = 'example', stop reason = breakpoint 1.1 frame #0: 0x0000555555570c23 example`rust_panic + 19 at panicking.rs:522 Process 20748 launched: '/home/eddy/usr/src/rust/learn-rust/fuzz/honggfuzz-rs/example-honggfuzz-rs/hfuzz_target/x86_64-unknown-linux-gnu/debug/example' (x86_64) (lldb) bt * thread rust-fuzz#1: tid = 20748, 0x0000555555570c23 example`rust_panic + 19 at panicking.rs:522, name = 'example', stop reason = breakpoint 1.1 * frame #0: 0x0000555555570c23 example`rust_panic + 19 at panicking.rs:522 frame rust-fuzz#1: 0x0000555555570c05 example`std::panicking::rust_panic_with_hook::h1f2449d529a25f22 + 613 at panicking.rs:492 frame rust-fuzz#2: 0x0000555555566f31 example`std::panicking::begin_panic::h6b93f15a3a49143e + 161 at panicking.rs:397 frame rust-fuzz#3: 0x0000555555560ddf example`example::main::_$u7b$$u7b$closure$u7d$$u7d$::h133bb93c90f06ee6 + 319 at main.rs:23 frame rust-fuzz#4: 0x000055555556074a example`honggfuzz::fuzz::hff971e0d42e0e071 + 394 at lib.rs:329 frame rust-fuzz#5: 0x00005555555615a8 example`example::main::h23bfee7ceacfd6a7 + 8 at main.rs:15 frame rust-fuzz#6: 0x000055555556164b example`std::rt::lang_start::_$u7b$$u7b$closure$u7d$$u7d$::h4f84ee5cbd303f5c + 11 at rt.rs:67 frame rust-fuzz#7: 0x00005555555705f3 example`std::panicking::try::do_call::h0b6fc9f6090c1e2b + 19 at rt.rs:52 frame rust-fuzz#8: 0x0000555555572417 example`__rust_maybe_catch_panic + 23 at lib.rs:86 frame rust-fuzz#9: 0x0000555555570ffc example`std::rt::lang_start_internal::hcea4e704875ab132 + 892 at panicking.rs:281 frame rust-fuzz#10: 0x0000555555561627 example`std::rt::lang_start::h9f940eb84f79aaf4 + 71 at rt.rs:67 frame rust-fuzz#11: 0x00005555555615da example`main + 42 frame rust-fuzz#12: 0x00007ffff721a2e1 libc.so.6`__libc_start_main + 241 frame rust-fuzz#13: 0x000055555556045a example`_start + 42 (lldb) quit Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] Signed-off-by: Eddy Petrișor <eddy.petrisor@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
If there's a version mismatch, this is what is outputted:
Seems like we can just print the error instead of doing the panic message dance.