Skip to content

Conversation

@folkertdev
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
fuzz-compress 36.42% <ø> (+0.05%) ⬆️
fuzz-decompress 27.55% <ø> (+0.05%) ⬆️
test-aarch64-apple-darwin 91.47% <100.00%> (+<0.01%) ⬆️
test-aarch64-unknown-linux-gnu 88.75% <100.00%> (+<0.01%) ⬆️
test-i686-unknown-linux-gnu 88.53% <100.00%> (?)
test-x86_64-apple-darwin 90.18% <100.00%> (-0.02%) ⬇️
test-x86_64-unknown-linux-gnu 91.01% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
libz-rs-sys-cdylib/src/gz.rs 90.20% <100.00%> (+0.02%) ⬆️

... and 6 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@folkertdev folkertdev force-pushed the miri-gz branch 3 times, most recently from 1c60715 to 9438e98 Compare December 1, 2025 13:33
The C source assumes that when a write succeeds it writes all bytes. that is not strictly required, but effectively true in most cases where zlib is used. However, miri does not respect this. So when running miri, explicitly loop until all bytes are written
@folkertdev folkertdev marked this pull request as ready for review December 1, 2025 14:37
@folkertdev folkertdev requested a review from bjorn3 December 1, 2025 14:38

/// Deal with miri often not writing the full buffer in one go. That is valid, but zlib assumes
/// that writes are to true files and succeed unless e.g. the disk is full.
#[cfg(miri)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can disable this behavior using -Zmiri-no-short-fd-operations.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, that is nicer.

@folkertdev folkertdev merged commit 8970b67 into main Dec 1, 2025
27 checks passed
@folkertdev folkertdev deleted the miri-gz branch December 1, 2025 15:22
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

Successfully merging this pull request may close these issues.

3 participants