Skip to content

Initialize optional transcriptome state#2698

Open
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-optional-transcriptome-ub
Open

Initialize optional transcriptome state#2698
justinblethrow-cloud wants to merge 1 commit into
alexdobin:masterfrom
justinblethrow-cloud:fix-optional-transcriptome-ub

Conversation

@justinblethrow-cloud

Copy link
Copy Markdown

Summary

  • Construct a valid Transcriptome object before APIs requiring a reference receive it.
  • Keep soloCellFiltering on its early-exit path with a real local transcriptome object.
  • Reuse the main transcriptome object for final Solo processing.
  • Initialize Transcript::sjYes in reset().
  • Add a focused initialization regression test.

Problem

Ordinary mapping currently forms Transcriptome& references from a null pointer in STAR.cpp, even when downstream code does not inspect transcriptome data. UBSan reports those reference bindings. Separately, Transcript::sjYes is left uninitialized and can be read during alignment; UBSan reports an invalid bool value.

The Transcriptome constructor already returns immediately when transcriptome quantification is not requested, so constructing a valid no-op object preserves the existing fast path.

Validation

  • extras/tests/scripts/testTranscriptInitialization.sh passes; the same placement-new test against unmodified 2.7.11b reports an invalid bool load.
  • A full ASan/UBSan build succeeds.
  • Ordinary mapping no longer reports null-reference or invalid-bool diagnostics.
  • SAM records 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