Skip to content
Snippets Groups Projects

MuonTesterTree: Fix use-after-free error.

In MuonTesterTree, m_branches_to_init must be listed before m_branches. When m_branches is destroyed, the branches being deleted will try to remove themselves from m_branches_to_init. If these are in the opposite order, then m_branches_to_init will already have been destroyed, and we'll be accessing freed memory.

Fixes crash seen during genconf in some builds of MuonGeoModelTest.

Also rewrite Remove() to use remove_if.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading