Skip to content

Fix modcall determinism and memory safety: init MethPosInfo::variantT…#121

Open
jiangxxxxxxxx wants to merge 1 commit intotwolinin:developfrom
jiangxxxxxxxx:feature/modcall-bugfix
Open

Fix modcall determinism and memory safety: init MethPosInfo::variantT…#121
jiangxxxxxxxx wants to merge 1 commit intotwolinin:developfrom
jiangxxxxxxxx:feature/modcall-bugfix

Conversation

@jiangxxxxxxxx
Copy link
Copy Markdown

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.

…ype, replace sam_itr_multi_next with sam_itr_next, switch VCF to truncate, add iterator guards. Validated identical MD5 across threads=32/64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant