Skip to content

[tree] Reset fNamesToBranches map in Streamer()#20721

Merged
silverweed merged 2 commits intoroot-project:masterfrom
silverweed:ttree_resetbranchmap
Dec 16, 2025
Merged

[tree] Reset fNamesToBranches map in Streamer()#20721
silverweed merged 2 commits intoroot-project:masterfrom
silverweed:ttree_resetbranchmap

Conversation

@silverweed
Copy link
Contributor

When reading, the Streamer() function may reuse the Tree. If the fNamesToBranch map is not invalidated GetBranch() may return stale pointers to freed memory.

Fixes #20706

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

When reading, the Streamer() function may reuse the Tree. If the
fNamesToBranch map is not invalidated GetBranch() may return stale
pointers to freed memory.

Fixes root-project#20706
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@github-actions
Copy link

Test Results

    21 files      21 suites   3d 21h 41m 11s ⏱️
 3 789 tests  3 789 ✅ 0 💤 0 ❌
77 620 runs  77 620 ✅ 0 💤 0 ❌

Results for commit 4667e75.

@silverweed silverweed merged commit 2f1d165 into root-project:master Dec 16, 2025
30 of 32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Segmentation violation in the TTree::Merge method for root >= v6.36.00

2 participants