Skip to content

[hbook] Pass the full 64 bit buffer address to HBNAM - #23938

Open
guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:h2root-cwn-address-23628
Open

guitargeek wants to merge 1 commit into
root-project:masterfrom
guitargeek:h2root-cwn-address-23628

Conversation

@guitargeek

@guitargeek guitargeek commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

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

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
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

Test Results

    21 files      21 suites   3d 6h 50m 38s ⏱️
 3 884 tests  3 535 ✅   0 💤 349 ❌
72 211 runs  70 680 ✅ 837 💤 694 ❌

For more details on these failures, see this check.

Results for commit 40ab178.

This branch has not been deployed

No deployments
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.

regression in h2root

1 participant