-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add decoder fuzzing #36
Conversation
…s; fuzz xz decoder for equivalent output to xz2 crate (liblzma wrapper)
It has occurred to me that completely identical error behaviour on arbitrary input is a pretty high bar, so it would be nice to have a less stringent test. I've added fuzzing targets checking that data compressed by the reference implementation can be decompressed by lzma-rs and vice versa. They seem to pass. |
fuzz/fuzz_targets/compare_xz.rs
Outdated
let bf = std::io::Cursor::new(compressed); | ||
let mut decomp: Vec<u8> = Vec::new(); | ||
// create new XZ decompression stream with 8Gb memory limit and checksum verification disabled | ||
let xz_stream = stream::Stream::new_stream_decoder(8*1024*1024*1024, stream::IGNORE_CHECK).expect("Failed to create stream"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm surprised that the cargo fmt -- --check
didn't trigger.
I'm even more surprised that Travis-CI didn't report any test results on the pull request.
These checks are definitely useful in addition!
My last comments are mostly nit picking at this point. In addition, if you (or anyone reading this) happen to have an idea about why my Travis-CI/Bors integration is broken, that would be very useful. |
I see the PR has "waiting on author" tag, but it's not clear to me what still needs to be changed. Could you provide me with a list of what needs to be done before this can be merged? |
The following comment is still pending (in particular, running Additionally, the code for imports has migrated to the 2018 edition in the meantime (no need for |
I've run |
Version of #34 as a single commit and without the fuzzing corpus