Repository navigation
Conversation
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## cpp_master #1235 +/- ##
==============================================
- Coverage 85.36% 80.06% -5.31%
==============================================
Files 80 80
Lines 5099 5839 +740
Branches 507 645 +138
==============================================
+ Hits 4353 4675 +322
- Misses 746 1164 +418 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Targets cpp_master.
zbuffer::write()ininclude/msgpack/v1/zbuffer.hppassigns thesize_tlength straight to zlib's 32-bitavail_in, so on 64-bit targets a write of 4 GiB or more feeds onlylen mod 2^32bytes to deflate and returns normally. Compressing a large serialized buffer in one call (zbuf.write(sbuf.data(), sbuf.size())with 4 GiB + 1 bytes) compresses 1 byte, and the receiver gets a truncated stream with no error on either side.expand()narrowsavail_outthe same way: with exactly 4 GiB free it becomes 0, so deflate gets no output room (write throws, flush keeps re-expanding to the same size).Feed zlib in
uInt-sized chunks and saturateavail_out, the C++ counterpart of what #1205 did formsgpack_zbuffer_write/msgpack_zbuffer_expandon c_master. The newtest/zbuffer_sizes.cppuses a counting stand-in fordeflate()so it needs no 4 GiB buffer; it fails on the current tree (4294967297 != 1) and passes with the fix. The C++11 and C++17 suites pass with g++ 16.2 and-Werror, apart from two existing Windows-only warnings (16-bitwchar_tin msgpack_container,-Wself-movein security_fixes_cpp11) that also fail without this change.