Skip to content

[6.38] [RF] Fix ownership problems in RooFixedProdPdf#21554

Merged
dpiparo merged 1 commit intoroot-project:v6-38-00-patchesfrom
guitargeek:bp_1
Mar 10, 2026
Merged

[6.38] [RF] Fix ownership problems in RooFixedProdPdf#21554
dpiparo merged 1 commit intoroot-project:v6-38-00-patchesfrom
guitargeek:bp_1

Conversation

@guitargeek
Copy link
Contributor

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)
@guitargeek guitargeek requested a review from lmoneta as a code owner March 10, 2026 11:39
@guitargeek guitargeek self-assigned this Mar 10, 2026
@guitargeek guitargeek changed the title [6.38][RF] Fix ownership problems in RooFixedProdPdf [6.38] [RF] Fix ownership problems in RooFixedProdPdf Mar 10, 2026
@github-actions
Copy link

Test Results

    19 files      19 suites   2d 21h 50m 18s ⏱️
 3 713 tests  3 713 ✅ 0 💤 0 ❌
68 826 runs  68 826 ✅ 0 💤 0 ❌

Results for commit 4d252a8.

@dpiparo dpiparo merged commit 42de0d2 into root-project:v6-38-00-patches Mar 10, 2026
29 checks passed
@guitargeek guitargeek deleted the bp_1 branch March 10, 2026 17:14
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.

2 participants