Skip to content

Align in-memory splice-junction records#2699

Open
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-aligned-junction-records
Open

Align in-memory splice-junction records#2699
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-aligned-junction-records

Conversation

@justinblethrow-cloud

Copy link
Copy Markdown

Summary

  • Align every typed field in the in-memory Junction record.
  • Pad each record from 23 to 24 bytes so records remain aligned in arrays.
  • Back the byte-addressed record buffer with vector<uint64> to guarantee suitable base alignment.
  • Add compile-time alignment regression checks.

Problem

The current 23-byte record places 32-bit counters at offsets 11 and 15 and 16-bit overhangs at offsets 19 and 21. Junction then exposes typed pointers to those fields and dereferences them. UBSan reports these stores during normal spliced-read mapping, beginning in ReadAlign_outputTranscriptSJ.cpp.

This is an internal runtime buffer change only; no genome-index or output-file format changes.

Validation

  • extras/tests/scripts/testJunctionAlignment.sh passes; its static assertions fail against unmodified 2.7.11b on the storage type, field offsets, and record stride.
  • A full ASan/UBSan build succeeds.
  • Spliced-read mapping no longer reports junction-record alignment errors.
  • SAM records, SJ.out.tab, and ReadsPerGene.out.tab are byte-identical to unmodified 2.7.11b.

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