Repository navigation
perf: make bitmap storage immutable, test from Swift 5.6 (supersedes #30) - #33
Merged
Merged
Conversation
CRoaring's safe deserializers only bound their reads: a payload with a well-formed header over bad containers (unsorted array values, say) still yields a bitmap, and the header warns that using it may crash. Both Decodable inits now call internal_validate and throw DecodingError.dataCorrupted with CRoaring's reason. The tests swap the last two values of an encoded array container, which decoded without an error before. The 32-bit decoder now reports invalid base64 and an unreadable payload separately, like the 64-bit one, with the same guard-let structure. The README badge pointed at the old workflow name, "Swift on Ubuntu (latest)"; it now points at tests.yml.
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.
This supersedes #30 by @vsarunas. #30 conflicts with master and comes from a fork that doesn't allow maintainer edits, so it couldn't be updated in place.
From #30
The four commits are cherry-picked onto master unchanged, and @vsarunas remains their author:
ptrandfrozenBackingbecomelet, which removes two dynamic exclusivity checks from everydeinit. Census1881 random access gets about 20% faster; the benchmark is in perf: make bitmap storage immutable, test from Swift 5.6 #30.RoaringBitmap's decoder throwsDecodingErroron corrupt input instead of crashing.swift:5.6-focal,5.10,6.2andlatestcontainers, replacingfwal/setup-swift, which doesn't support Ubuntu 26.04.swift-tools-versiongoes to 5.6, andactions/checkoutto v7.The only conflict was
tests.yml. #30's container matrix replaces the stopgap in f594ff9.Added here
init(from:)now callinternal_validateand throwDecodingError.dataCorruptedwith CRoaring's reason. New tests swap the last two values of an encoded array container. Before this change, that input decoded without an error.tests.yml).Testing
swift test,--sanitize=addressand--sanitize=undefined.swift:5.6-focaland5.10run 89 tests (theRawSpantests need 6.2), and6.2andlatest(6.4.1) run 91. All pass.