-
-
Notifications
You must be signed in to change notification settings - Fork 28
Implement gzread and gzbuffer #345
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
Conversation
Codecov ReportAttention: Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 7 files with indirect coverage changes 🚀 New features to boost your workflow:
|
This is still a work in progress. I'm still tracking down an uninitialized read that happens somewhere in the inflate operation. |
This comment was marked as outdated.
This comment was marked as outdated.
What command do you run? |
I think the miri error is actually a soundness bug in the inflate code, where some uninitialized memory is read. We should not be doing that of course, but I don't think it's dangerous in this case. I'll fix that separately. |
My local Miri command is |
I'm not sure what's happening in the failed x86_64-pc-windows-gnu test. I'll try to set up a local Windows dev environment tomorrow to repro it. |
I got the test error to repro in a local |
I can reproduce the problem by using testw = "test --target x86_64-pc-windows-gnu"
[target.'cfg(windows)']
runner = "wine" The I can run these commands to gather the stdout, and add
I use Lines 926 to 930 in 1e3d9ec
|
Yes, on Windows I see libc read returning 128 bytes on the first five reads, then 22 bytes, then zero. |
The latest change that I just pushed adds a little test case called |
ah yes, you need to add the |
Thanks! |
7b4ff3b
to
97c28f0
Compare
libz-rs-sys/src/gz.rs
Outdated
let mut count = 0; | ||
loop { | ||
count += 1; | ||
assert_ne!(count, 100); |
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.
Is this left from debugging?
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.
Oops! Leftover from debugging. Thanks for catching that!
libz-rs-sys/src/gz.rs
Outdated
continue; // Now that we've tried reading, we can try to copy from the output buffer. | ||
// The copy above assures that we will leave with space in the | ||
// output buffer, allowing at least one gzungetc() to succeed. |
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.
this reads nicer if you put the comment above the continue
(and maybe add an empty line after the assert_ne
2 final minor things, otherwise this looks good! |
No description provided.