Skip to content

Conversation

@jakobbotsch
Copy link
Member

@jakobbotsch jakobbotsch commented Nov 19, 2025

We did not properly ensure the alignment of the async resumption data blob, only the overall alignment of the entire data section.

Unify the code that inserts padding and use it for the async resumption data too.

The alignment was also missing for basic block address sections, but we did not have a problem here because we do not use absolute basic block addresses for 64-bit targets. Still, add the code to ensure this would get aligned correctly.

Fix #121779

We did not properly ensure the alignment of the async resumption data
section, only the overall alignment of the data section.

Unify the code that inserts padding and use it for the async resumption
data too.

The alignment was also missing for basic block address sections, but we
did not have a problem here because we do not use absolute basic block
addresses for 64-bit targets.
@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 Nov 19, 2025
@jakobbotsch jakobbotsch marked this pull request as ready for review November 20, 2025 11:22
Copilot AI review requested due to automatic review settings November 20, 2025 11:22
Copilot finished reviewing on behalf of jakobbotsch November 20, 2025 11:24
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

This PR fixes an alignment issue in the JIT emitter by ensuring the async resumption data section is properly aligned. The fix refactors the alignment logic into a new dedicated function that can be reused across different data section types.

Key changes:

  • Extracted alignment logic into a new emitEnsureDataSectionAlignment function
  • Applied proper alignment to async resumption data sections
  • Added alignment logic to basic block table data sections

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/coreclr/jit/emitpub.h Adds declaration for new emitEnsureDataSectionAlignment function
src/coreclr/jit/emit.cpp Refactors alignment logic into new function, applies it to async resumption and BB table data, fixes array pointer usage

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib PTAL @kg

@jakobbotsch jakobbotsch requested a review from kg November 20, 2025 11:28
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.

Async resume info has unaligned pointers

1 participant