Skip to content

SPMI: Fix aligned allocation size computation#123707

Merged
jakobbotsch merged 2 commits intodotnet:mainfrom
jakobbotsch:fix-spmi-allocmem
Jan 28, 2026
Merged

SPMI: Fix aligned allocation size computation#123707
jakobbotsch merged 2 commits intodotnet:mainfrom
jakobbotsch:fix-spmi-allocmem

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Jan 28, 2026

Rounding up the size is not enough (in the worst case the size is already aligned; that doesn't automatically mean the returned memory address will be aligned).

Copilot AI review requested due to automatic review settings January 28, 2026 09:01
@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jan 28, 2026
@dotnet-policy-service
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @dotnet/jit-contrib
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adjusts SuperPMI’s allocMem allocation sizing so there is sufficient space after aligning the returned pointer, preventing under-allocation when an alignment bump occurs.

Changes:

  • Allocate hot code buffers with extra padding before aligning the returned pointer.
  • Allocate readonly data buffers with extra padding before aligning the returned pointer.

@jakobbotsch
Copy link
Member Author

/ba-g SPMI only change fixing JIT pipelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants