[hist] Fix TFormula Hessian result sizing#22877
Open
shuv-amp wants to merge 1 commit into
Open
Conversation
HessianPar writes fNpar * fNpar entries, but its CladStorage overload only resized results smaller than fNpar. For two or more parameters, a partially sized result could pass the check and leave Clad writing past the vector's size. Check for the full flattened Hessian size and cover the missed case in ResultUpsize.
Contributor
|
Hi! Thanks for the PR! How did you get interested in fixing this? Are you a user of ROOT, TFormula, or Clad? |
Author
|
Hi @guitargeek, I’m not a user yet. I’d been reading about CERN, and ROOT kept coming up, so I started exploring the code. In HessianPar, I noticed the size check used fNpar even though the Hessian result needs fNpar * fNpar entries. A two-parameter case exposed the mismatch. |
Test Results 18 files 18 suites 3d 10h 22m 25s ⏱️ For more details on these failures, see this check. Results for commit b0fe66b. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TFormula::HessianParreturns a flattened matrix withfNpar * fNparelements, but the
CladStorageoverload only resized results smallerthan
fNpar. With two parameters, a two-element result passed the oldcheck even though the Hessian needs four elements.
Use the full Hessian size for the check and update the existing
ResultUpsizetest to cover this case.