Skip to content

Fix argument passing conventions in THbookFile#21407

Merged
hageboeck merged 2 commits intoroot-project:masterfrom
hageboeck:fix_h2root
Feb 28, 2026
Merged

Fix argument passing conventions in THbookFile#21407
hageboeck merged 2 commits intoroot-project:masterfrom
hageboeck:fix_h2root

Conversation

@hageboeck
Copy link
Member

As requested in
#21404 (comment)

Update argument passing also in THbookFile.

When variable-length strings are passed into functions compiled by
gfortran, the lengths of the strings have to be passed at the end of the
argument list as size_t. When using gcc <= 7 or clang (where the
__GNUC__ macro might return unpredictable values), we were putting int on
the C side, which got interpreted as size_t on the fortran side.
Copy link
Collaborator

@ferdymercury ferdymercury left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ferdymercury ferdymercury mentioned this pull request Feb 27, 2026
1 task
@ferdymercury
Copy link
Collaborator

ferdymercury commented Feb 27, 2026

Side note, after incorporating these changes, it still fails on alma10 without -O0, see https://github.com/root-project/root/actions/runs/22499554944/job/65182799794?pr=20538

*** Break *** segmentation violation
   Generating stack trace...
   0x000000000040a62c in hrfile_ at /github/home/ROOT-CI/src/misc/minicern/src/hbook.f:322 from h2root
   0x000000000040f920 in hropen_ at /github/home/ROOT-CI/src/misc/minicern/src/hbook.f:246 from h2root
   0x0000000000404cc0 in main at /github/home/ROOT-CI/src/main/src/h2root.cxx:337 from h2root
   0x0000ffffb80260dc in <unknown> from /lib64/libc.so.6
   0x0000ffffb80261bc in __libc_start_main at :? from /lib64/libc.so.6
   0x0000000000404ff0 in _start + 0x30 from h2root

(tracked at #19329)

@github-actions
Copy link

Test Results

    22 files      22 suites   3d 6h 27m 58s ⏱️
 3 808 tests  3 807 ✅ 1 💤 0 ❌
76 614 runs  76 605 ✅ 9 💤 0 ❌

Results for commit 09ad756.

@hageboeck hageboeck merged commit 2947b9c into root-project:master Feb 28, 2026
30 checks passed
@hageboeck hageboeck deleted the fix_h2root branch February 28, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants