problem_report: use iterator in CompressedValue.write - #638
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #638 +/- ##
=======================================
Coverage 84.46% 84.47%
=======================================
Files 106 106
Lines 21066 21038 -28
Branches 3195 3184 -11
=======================================
- Hits 17794 17772 -22
+ Misses 2800 2794 -6
Partials 472 472 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
bdrung
force-pushed
the
use-iterator
branch
3 times, most recently
from
August 3, 2026 23:30
04090a3 to
c44cde4
Compare
Member
Author
|
I am marking this PR as bug fix, because "problem_report: check if eof is reached in decode_compressed_stream" fixes silently failing. |
The method `decode_compressed_stream` is used outside of `CompressedValue`. Move this method to a stand-alone function to ease reusing it.
Do not rely on the implementation detail and create a real corrupted core dump for testing `add_gdb_info` in `test_add_gdb_info_damaged_gz_core`.
`CompressedValue.decode_compressed_stream` does not raise an `EOFError` in case the file ended before the end-of-stream marker was reached, but `gzip.GzipFile` would do that.
Make the code more readable and compact by instructing zlib to use native gzip header and trailer processing.
Use the iterator version `decode_compressed_stream` in `CompressedValue.write` to avoid code duplication.
Hyask
approved these changes
Aug 20, 2026
Hyask
left a comment
Contributor
There was a problem hiding this comment.
Alright, reading this commit by commit makes a lot more sense than the whole diff. LGTM.
This file contains hidden or 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
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.
Use the iterator version
decode_compressed_streaminCompressedValue.writeto avoid code duplication.This is in preparation for #639 which is not ready yet.