Skip to content

EMCAL: initialise the MC kinematics reader pointer in the digitizer - #16073

Merged
ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr16073
Nov 7, 2026
Merged

ktf merged 1 commit into
AliceO2Group:devfrom
ktf:pr16073

Conversation

@ktf

@ktf ktf commented Nov 7, 2026

Copy link
Copy Markdown
Member

DigitizerSpec::mcReader had no initialiser, and run() only creates the
reader when the pointer is null. When the memory the (large) spec is
allocated in is not zeroed, the reader is never created and
getMCEventHeader() dereferences garbage, crashing the digitizer at the
first collision accepted by the CTP minimum-bias trigger. Seen on macOS
in about one run in three; Linux likely hides it because large
allocations come from fresh zeroed pages.

Also initialise mCTPConfig, which follows the same pattern.

DigitizerSpec::mcReader had no initialiser, and run() only creates the
reader when the pointer is null. When the memory the (large) spec is
allocated in is not zeroed, the reader is never created and
getMCEventHeader() dereferences garbage, crashing the digitizer at the
first collision accepted by the CTP minimum-bias trigger. Seen on macOS
in about one run in three; Linux likely hides it because large
allocations come from fresh zeroed pages.

Also initialise mCTPConfig, which follows the same pattern.
@ktf
ktf requested review from jokonig and nstrangm as code owners November 7, 2026 13:02
@ktf

ktf commented Nov 7, 2026

Copy link
Copy Markdown
Member Author

Trivial and currently randomly crashing. Merging.

@ktf
ktf merged commit 5e87fb2 into AliceO2Group:dev Nov 7, 2026
5 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant