Repository navigation
fix(correctness): prevent arithmetic overflow, underflow panics, and … - #120
Closed
IgnatiusPang wants to merge 1 commit into
Closed
IgnatiusPang wants to merge 1 commit into
IgnatiusPang wants to merge 1 commit into
Conversation
…slice boundary issues - bitkmer: guard 32-mer k-mers against 2^64 exponentiation overflow in extend_kmer and minimizer - bitkmer: advance start_pos past invalid characters before resetting kmer_len in update_position to prevent scan stalling - bitkmer: handle kmer.1 == 0 safely in bitmer_to_bytes without underflowing to 255 - kmer: guard self.k == 0 in CanonicalKmers::update_position to prevent unsigned underflow panic - sequence: guard minimizer against sequences shorter than window length to prevent slice out-of-bounds panic - test: add comprehensive unit tests for 32-mer support and zero boundary safety
Contributor
|
Thanks. The k=32 overflow is real and I'll fix it separately. Closing because this bundles unrelated changes and conflicts with #121. In the future, please open an issue and disclose AI-generated contributions. |
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.
Pull Request: Fix boundary panics, integer overflow/underflow, and slice bounds in bitkmer, kmer, and sequence
Source Branch:
fix/boundary-and-overflow-robustnessTarget Repository:
onecodex/needletail(master)Commit:
f417b8f(fix(correctness): prevent arithmetic overflow, underflow panics, and slice boundary issues)GitHub Pull Request Template