Fix sjA/sjFilter/sjChunks memory leaks#2676
Open
lkeegan wants to merge 1 commit intoalexdobin:masterfrom
Open
Conversation
- these were allocated and only used locally but not deleted Only reserve and populate `P.sjAll` vectors when Solo SJ feature is requested - reduces memory use when Solo SJ feature is not requested
birdingman0626
added a commit
to birdingman0626/STAR-Win
that referenced
this pull request
Apr 13, 2026
Bug fixes from upstream STAR PRs: - PR alexdobin#2163: Remove OOB write in sjdbInsertJunctions.cpp (SA.writePacked at index nSA is one past the end; memory corruption confirmed by Valgrind) - PR alexdobin#2676: Fix memory leaks in outputSJ.cpp (sjA, sjFilter, sjChunks arrays allocated but never freed) - PR alexdobin#535: Fix segfault in SA lookup shortcut in ReadAlign_maxMappableLength2strands.cpp (unreliable shortcut caused unsigned underflow and SIGSEGV on certain genomes) Performance optimizations: - PR alexdobin#791: PackedArray bitmask optimization (replace expensive double-shift with single AND in hot operator[]; ~1-2% improvement) - PR alexdobin#791: Add FastResetVector.h (O(modified) reset instead of O(N) memset; available for winBin array optimization) - PR alexdobin#773 (partial): Early rejection in stitchWindowAligns.cpp to skip unnecessary Transcript copies when alignment will obviously fail HTSlib upgrade evaluated and deferred: current 1.3 has minimal security surface (no CRAM, no network I/O, trusted input only). Note: uniquely mapped count changes slightly due to PR alexdobin#535 fix — the buggy shortcut was incorrectly skipping valid alignments. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Only reserve and populate
P.sjAllvectors when Solo SJ feature is requested