Skip to content

[release/10.0] Use DllImportSearchPath.AssemblyDirectory for loading jitinterface library - #119333

Merged
jeffschwMSFT merged 1 commit into
release/10.0from
backport/pr-119287-to-release/10.0
Sep 3, 2025
Merged

[release/10.0] Use DllImportSearchPath.AssemblyDirectory for loading jitinterface library#119333
jeffschwMSFT merged 1 commit into
release/10.0from
backport/pr-119287-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Backport of #119287 to release/10.0

/cc @elinor-fung

Customer Impact

  • Customer reported
  • Found internally

Issue: #118999

Publishing a NativeAOT project on Unix with IlcInstructionSet=native fails.

When loading the jitinterface library on Unix, ilc (native AOT app) was relying on the application path being part of the default OS search. With the removal of the default RPATH for native AOT binaries, this is no longer the case. The code doing the loading was using DllImportSearchPath.ApplicationDirectory, which has no meaning on non-Windows. DllImportSearchPath.AssemblyDirectory is the only flag respected - and for native AOT, would look next to the application.

Regression

  • Yes
  • No

.NET 10 Preview 6: #115236

Testing

Manual verification.

Risk

Low. Fix is targeted.

@elinor-fung elinor-fung added this to the 10.0.0 milestone Sep 3, 2025

@jeffschwMSFT jeffschwMSFT 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.

approved. we can merge when ready

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release area-NativeAOT-coreclr labels Sep 3, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

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

@jeffschwMSFT
jeffschwMSFT merged commit 81e8e84 into release/10.0 Sep 3, 2025
103 of 107 checks passed
@elinor-fung
elinor-fung deleted the backport/pr-119287-to-release/10.0 branch September 3, 2025 23:36
@elinor-fung elinor-fung removed Servicing-approved Approved for servicing release area-NativeAOT-coreclr labels Sep 5, 2025
@elinor-fung elinor-fung added Servicing-approved Approved for servicing release area-NativeAOT-coreclr labels Sep 5, 2025
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-NativeAOT-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants