Fix modcall determinism and memory safety: init MethPosInfo::variantT…#121
Open
jiangxxxxxxxx wants to merge 1 commit intotwolinin:developfrom
Open
Fix modcall determinism and memory safety: init MethPosInfo::variantT…#121jiangxxxxxxxx wants to merge 1 commit intotwolinin:developfrom
jiangxxxxxxxx wants to merge 1 commit intotwolinin:developfrom
Conversation
…ype, replace sam_itr_multi_next with sam_itr_next, switch VCF to truncate, add iterator guards. Validated identical MD5 across threads=32/64.
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.
I updated ModCallParsingBam.h/.cpp in longphase to improve modcall determinism and safety. I initialized MethPosInfo::variantType in the constructor and explicitly set it to MOD in non-mod/noise branches to remove undefined behavior; replaced sam_itr_multi_next with the correct sam_itr_next to match sam_itr_querys, and added iterator cleanup; changed VCF output from append mode to truncate/overwrite to prevent old-run contamination; and added several iterator/end-check guards to avoid unsafe dereferences. After rebuilding, I validated with your script and confirmed identical non-header line counts and MD5 hashes across threads=32 and threads=64, and also across repeated runs.