Skip to content

Link statically to GrowableFunctionTable#131017

Merged
jkotas merged 4 commits into
dotnet:mainfrom
huoyaoyuan:pre-win10
Jul 19, 2026
Merged

Link statically to GrowableFunctionTable#131017
jkotas merged 4 commits into
dotnet:mainfrom
huoyaoyuan:pre-win10

Conversation

@huoyaoyuan

Copy link
Copy Markdown
Member

RtlAddGrowableFunctionTable and related APIs were introduced in Windows 8.

The functions are present in the WindowsAPI allow list of NativeAOT, so I think linking ntdll is acceptible here.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Jul 18, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 4 pipeline(s).
12 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @agocke
See info in area-owners.md if you want to be subscribed.

@MichalPetryka

Copy link
Copy Markdown
Contributor

Does it work under UWP?

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 changes CoreCLR’s Windows x64 unwind-info publishing to call the Win8+ growable function table APIs (RtlAddGrowableFunctionTable, RtlGrowFunctionTable, RtlDeleteGrowableFunctionTable) directly, and adds ntdll.lib to the Windows link set to resolve those symbols at link/load time.

Changes:

  • Replaces runtime GetProcAddress-based discovery of growable function table APIs with direct calls to Rtl*GrowableFunctionTable.
  • Removes UnwindInfoTable::Initialize() and its startup invocation.
  • Links coreclr against ntdll.lib on Windows builds.

Reviewed changes

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

File Description
src/coreclr/vm/codeman.h Removes UnwindInfoTable::Initialize() declaration; updates related comments.
src/coreclr/vm/codeman.cpp Drops dynamic function-pointer initialization and calls Rtl*GrowableFunctionTable directly.
src/coreclr/vm/ceemain.cpp Removes the startup call to UnwindInfoTable::Initialize().
src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt Adds ntdll.lib to the Windows link libraries list.

Comment thread src/coreclr/vm/codeman.cpp
Comment thread src/coreclr/vm/codeman.h
@jkotas

jkotas commented Jul 19, 2026

Copy link
Copy Markdown
Member

Does it work under UWP?

The original UWP with restricted APIs is not a thing we worry about anymore for CoreCLR. We use a lot of APIs that are marked as "desktop apps only".

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comments suppressed due to low confidence (1)

src/coreclr/vm/codeman.h:597

  • Use “Windows 8” instead of “Win8” for readability/consistency (also matches the prior review request).
// On Windows x64, publish OS UnwindInfo (accessed from RUNTIME_FUNCTION
// structures) to support the ability to unwind the stack. In Win8 and above
// new APIs were defined that allow incremental publishing via a table.

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@jkotas
jkotas merged commit 2515f97 into dotnet:main Jul 19, 2026
106 of 109 checks passed
@huoyaoyuan
huoyaoyuan deleted the pre-win10 branch July 19, 2026 10:22
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants