Repository navigation
[hbook] Pass the full 64 bit buffer address to HBNAM - #23938
Open
guitargeek wants to merge 1 commit into
Open
guitargeek wants to merge 1 commit into
guitargeek wants to merge 1 commit into
Conversation
Since 21cb0e6 (6.40.04), LOCF returns the full 64 bit word address instead of the low 32 bits. HNMADR computes the word offset of a column-wise ntuple variable as IADDW - LOCF(IQ(1)), but h2root and THbookFile still passed the buffer address to HBNAM as a 32 bit int, so IADDW lost bits 32 and 33 of the address while LOCF kept them. The stored offset was off by a multiple of 2^30 words whenever those bits were set, which is the case for most PIE placements, and HGNT2 then wrote the ntuple columns to a wild address. Pass the address as INTEGER*8 through HBNAM and compute the offset from the full addresses. THbookFile::SetBranchAddress also passed the value stored at the user pointer instead of the pointer; it now passes the address like the other call sites. Add a roottest that converts a small column-wise ntuple with h2root. The input file is written by the included mkcwn.f with CERNLIB. Fixes root-project#23628 Assisted-by: claude-code:claude-fable-5-1
guitargeek
requested review from
bellenot,
dpiparo,
hageboeck and
pcanal
as code owners
November 2, 2026 07:25
Test Results 21 files 21 suites 3d 6h 50m 38s ⏱️ For more details on these failures, see this check. Results for commit 40ab178. |
This branch has not been deployed
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.
Since 21cb0e6 (6.40.04), LOCF returns the full 64 bit word address instead of the low 32 bits. HNMADR computes the word offset of a column-wise ntuple variable as IADDW - LOCF(IQ(1)), but h2root and THbookFile still passed the buffer address to HBNAM as a 32 bit int, so IADDW lost bits 32 and 33 of the address while LOCF kept them. The stored offset was off by a multiple of 2^30 words whenever those bits were set, which is the case for most PIE placements, and HGNT2 then wrote the ntuple columns to a wild address.
Pass the address as INTEGER*8 through HBNAM and compute the offset from the full addresses. THbookFile::SetBranchAddress also passed the value stored at the user pointer instead of the pointer; it now passes the address like the other call sites.
Add a roottest that converts a small column-wise ntuple with h2root. The input file is written by the included mkcwn.f with CERNLIB.
Fixes #23628
Assisted-by: claude-code:claude-fable-5-1
Needs to be backported to 6.40 and 6.42