Link statically to GrowableFunctionTable#131017
Conversation
|
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. |
|
Tagging subscribers to this area: @agocke |
|
Does it work under UWP? |
There was a problem hiding this comment.
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 toRtl*GrowableFunctionTable. - Removes
UnwindInfoTable::Initialize()and its startup invocation. - Links
coreclragainstntdll.libon 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. |
| // On Windows x64, publish OS UnwindInfo (accessed from RUNTIME_FUNCTION | ||
| // structures) to support the ability unwind the stack. Unfortunately the pre-Win8 | ||
| // APIs defined a callback API for publishing this data dynamically that ETW does | ||
| // not use (and really can't because the walk happens in the kernel). In Win8 | ||
| // structures) to support the ability unwind the stack. In Win8 and above | ||
| // new APIs were defined that allow incremental publishing via a table. |
There was a problem hiding this comment.
Could you please apply this feedback?
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". |
RtlAddGrowableFunctionTableand 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.