Skip to content

Conversation

@ViktorHofer
Copy link
Member

@ViktorHofer ViktorHofer commented Jan 23, 2026

Forward port of #122179 to fix the broken runtime build with VS 2026

Include libunwind/libunwind#931 in the build of
the libunwind dependency.

Fixes runtime build errors on `1es-windows-2022-open` that are blocking
HTTP & SSL stress runs.

- [x] Found internally

Our internal HTTP and SSL stress tests are failing to build on the 8.0
branch.
An update of MSVC in the `1es-windows-2022-open` image brought updated
analyzer rules that now fail the build of dotnet/runtime on Windows.
```
mempool.c(96): warning C4319: '~': zero extending 'unsigned long' to 'size_t' of greater size
```

This change adds `(size_t)` casts in the libunwind dependency, which
resolves the new errors.

- [X] Yes

Infra update.

Regular CI is still passing + CI stress runs for HTTP and SSL now build
and work again.

Low.
This is a one-line targeted fix that only adds casts.
@ViktorHofer ViktorHofer requested a review from janvorli as a code owner January 23, 2026 09:56
Copilot AI review requested due to automatic review settings January 23, 2026 09:56
@ViktorHofer ViktorHofer requested review from a team and AaronRobinsonMSFT as code owners January 23, 2026 09:56
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 23, 2026
@ViktorHofer ViktorHofer requested a review from MihaZupan January 23, 2026 09:56
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 applies an upstream libunwind fix to resolve C4319 build warnings on VS2026 related to zero-extending unsigned long to size_t in the UNW_ALIGN macro. The change is a backport to the release/9.0 branch that adds explicit size_t casts to prevent compiler warnings when building on Windows with updated MSVC analyzer rules.

Changes:

  • Modified the UNW_ALIGN macro to use explicit size_t casts instead of unsigned long literals
  • Updated the version tracking file to document the application of upstream PR #931

Reviewed changes

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

File Description
src/native/external/libunwind/include/libunwind_i.h Updated UNW_ALIGN macro with explicit size_t casts to resolve C4319 warnings
src/native/external/libunwind-version.txt Added documentation of upstream PR #931 being applied

@ViktorHofer ViktorHofer changed the title [release/9.0] Avoid C4319 build warnings in libunwind (#122179) Backport: Avoid C4319 build warnings in libunwind (#122179) Jan 23, 2026
@ViktorHofer ViktorHofer changed the title Backport: Avoid C4319 build warnings in libunwind (#122179) Avoid C4319 build warnings in libunwind (#122179) Jan 23, 2026
@ViktorHofer ViktorHofer merged commit 098be92 into main Jan 23, 2026
167 of 169 checks passed
@ViktorHofer ViktorHofer deleted the ForwardPortLinUnwindFix branch January 23, 2026 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants