Skip to content

Fix invalid iterator dereference in MaterialManager debug log - #16143

Merged
sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:fix-matmgr-density-debug-log
Nov 17, 2026
Merged

sawenzel merged 1 commit into
AliceO2Group:devfrom
sawenzel:fix-matmgr-density-debug-log

Conversation

@sawenzel

Copy link
Copy Markdown
Collaborator

This is fixing a bug where the MaterialManager debug printout dereferenced an end() iterator. With O2SIM_MATMGR_LOCALDENSITY_DEBUG set and a global density factor other than 1, the log line in getDensity read iter->second after all lookups had failed. The line now prints the global factor that is actually applied.

This fixes a crash-prone debug printout in MaterialManager::getDensity.

- With O2SIM_MATMGR_LOCALDENSITY_DEBUG set and a global density factor other than 1, the log line read iter->second from an end() iterator.
- The line now prints the global factor that is actually applied.
@sawenzel
sawenzel requested a review from shahor02 as a code owner November 17, 2026 10:47
@sawenzel
sawenzel merged commit a84b2fa into AliceO2Group:dev Nov 17, 2026
7 of 11 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