Skip to content

[6.36] [RF] Fix ownership problems in RooFixedProdPdf#21553

Merged
dpiparo merged 1 commit intoroot-project:v6-36-00-patchesfrom
root-project-bot:BP_6.36_pull_21540
Mar 10, 2026
Merged

[6.36] [RF] Fix ownership problems in RooFixedProdPdf#21553
dpiparo merged 1 commit intoroot-project:v6-36-00-patchesfrom
root-project-bot:BP_6.36_pull_21540

Conversation

@root-project-bot
Copy link

Backport of #21540, requested by @guitargeek.

This is a followup on 101beeb, where the RooFit objects owned
by the `RooProdPdf::CacheElem` are transferred to the `RooFixedProdPdf`.

Since there was a data member `CacheElem::_ownedList`, I was misled
into thinking that the other collections are non-owning. This is not the
case, as the elements of `_numList` and `_denList` are all added with
`RooAbsCollection::addOwned()`. So the ownership also has to be
transferred from these collections.

Finally, the control flow is fixed up such that the ownership transfer is
done before an early return, and also the ownership for all objects in
the owned collections is transferred unconditionally. That's because
some objects are only unconditionally required as dependencies of the
top-level RooAbsArgs in the chache element.

This fixes a crash when running the reproducer in GitHub issue root-project#16673
with ROOT master.

(cherry picked from commit 829309f)
@github-actions
Copy link

github-actions bot commented Mar 10, 2026

Test Results

    18 files      18 suites   2d 16h 6m 58s ⏱️
 2 753 tests  2 750 ✅ 1 💤 2 ❌
47 852 runs  47 844 ✅ 6 💤 2 ❌

For more details on these failures, see this check.

Results for commit 3d40286.

♻️ This comment has been updated with latest results.

@dpiparo dpiparo merged commit 642ac77 into root-project:v6-36-00-patches Mar 10, 2026
39 of 41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants