Skip to content

[ntuple] Fixes for alignment#22312

Open
jblomer wants to merge 6 commits into
root-project:masterfrom
jblomer:ntuple-update-align
Open

[ntuple] Fixes for alignment#22312
jblomer wants to merge 6 commits into
root-project:masterfrom
jblomer:ntuple-update-align

Conversation

@jblomer
Copy link
Copy Markdown
Contributor

@jblomer jblomer commented May 16, 2026

Use the new TClass alignment information where applicable. This fixes

  • Alignment of classes whose alignment is defined by a transient member
  • Alignment of certain streamer fields

Additionally, use the new and delete operators with alignment info. This ensures correct memory allocation for over-aligned types.

Fixes #16765

@jblomer jblomer self-assigned this May 16, 2026
@jblomer jblomer requested a review from bellenot as a code owner May 16, 2026 05:32
@jblomer jblomer requested review from dpiparo and pcanal as code owners May 16, 2026 05:32
@jblomer jblomer force-pushed the ntuple-update-align branch from bb61c3d to 694bd02 Compare May 16, 2026 07:25
@jblomer jblomer requested review from enirolf, hahnjo and silverweed May 16, 2026 07:26
@jblomer jblomer force-pushed the ntuple-update-align branch 2 times, most recently from 27ddc85 to ba94832 Compare May 16, 2026 07:42
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 16, 2026

Test Results

    22 files      22 suites   3d 8h 47m 24s ⏱️
 3 861 tests  3 791 ✅   0 💤  70 ❌
76 197 runs  75 839 ✅ 219 💤 139 ❌

For more details on these failures, see this check.

Results for commit 074d861.

♻️ This comment has been updated with latest results.

@jblomer jblomer added the clean build Ask CI to do non-incremental build on PR label May 16, 2026
@jblomer jblomer closed this May 16, 2026
@jblomer jblomer reopened this May 16, 2026
Comment thread core/foundation/inc/ROOT/BitUtils.hxx Outdated
Comment thread core/foundation/inc/ROOT/BitUtils.hxx Outdated
Comment thread tree/ntuple/src/RFieldBase.cxx Outdated
Copy link
Copy Markdown
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

The code changes look good overall; quickly looking at the failures, it appears that macOS and Windows are complaining about the missing import of <array>. Not sure if that solves all issues...

Comment thread tree/ntuple/test/CustomStruct.hxx
Copy link
Copy Markdown
Member

@hahnjo hahnjo left a comment

Choose a reason for hiding this comment

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

As discussed offline, this is missing the part of aligning the dynamic array in std::vector<T> (relatively easy to do) and RVec<T> (harder because it currently uses malloc and free). In the worst case, we discussed throwing in case we have alignment larger than std::max_align_t

@jblomer jblomer force-pushed the ntuple-update-align branch 3 times, most recently from 787669e to 2c2dc4a Compare May 26, 2026 11:59
@jblomer jblomer requested review from hahnjo and pcanal May 26, 2026 20:14
@jblomer jblomer removed the clean build Ask CI to do non-incremental build on PR label May 26, 2026
@jblomer jblomer closed this May 26, 2026
@jblomer jblomer reopened this May 26, 2026
Comment thread tree/ntuple/src/RFieldBase.cxx Outdated
@jblomer jblomer added the clean build Ask CI to do non-incremental build on PR label May 27, 2026
@jblomer jblomer force-pushed the ntuple-update-align branch from 2c2dc4a to aa8c36c Compare June 1, 2026 13:44
@jblomer jblomer requested a review from pcanal June 1, 2026 13:45
Comment thread tree/ntuple/src/RFieldSequenceContainer.cxx Outdated
Comment thread tree/ntuple/src/RFieldSequenceContainer.cxx Outdated
Copy link
Copy Markdown
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@jblomer jblomer force-pushed the ntuple-update-align branch from aa8c36c to 074d861 Compare June 2, 2026 08:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR in:RNTuple Small Bug Density

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ntuple] Wrong alignment with transient class member

4 participants