-
Notifications
You must be signed in to change notification settings - Fork 5k
Merging internal commits for release/8.0 #116498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merging internal commits for release/8.0 #116498
Conversation
…rios (COM, C++/CLI, custom component host) could try to load coreclr from CWD There is a fallback for apps with no .deps.json where the host will consider the app directory for loading coreclr. In component hosting scenarios, we do not have an app path / directory. We were incorrectly going down the path of looking for coreclr next to the empty app directory, which resulted in looking in the current directory. This change skips that path for libhost scenarios. It also adds checks that the paths we determine for loading coreclr, hostpolicy, and hostfxr are absolute.
…-merge-8.0-2025-06-10-1311
There was a problem hiding this 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 merges internal commits for release/8.0 and introduces explicit checks to ensure that core libraries (coreclr, hostfxr, hostpolicy) are loaded from absolute paths. Key changes include:
- Adding absolute path validations in multiple native host components.
- Adjusting deps_resolver logic to account for libhost scenarios.
- Introducing new tests that verify hosting components in the working directory are ignored.
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/native/corehost/hostpolicy/standalone/coreclr_resolver.cpp | Added an absolute path check for the coreclr DLL. |
src/native/corehost/hostpolicy/deps_resolver.cpp | Modified logic to add known paths only for non-libhost cases and added an assertion on the application directory. |
src/native/corehost/fxr_resolver.h | Introduced an absolute path check for hostfxr. |
src/native/corehost/fxr/standalone/hostpolicy_resolver.cpp | Added an absolute path check for hostpolicy. |
src/native/corehost/apphost/standalone/hostfxr_resolver.cpp | Added an absolute path check for hostfxr and updated the status code when the check fails. |
src/installer/tests/TestUtils/TestArtifact.cs | Added a factory method to create test artifacts with associated deletion paths. |
src/installer/tests/HostActivation.Tests/NativeHosting/NativeHostingResultExtensions.cs | Renamed the extension class and added new methods for resolving hostfxr, hostpolicy, and coreclr. |
src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs | Added a test to ensure that hosting binaries in the working directory are ignored. |
src/installer/tests/HostActivation.Tests/NativeHosting/Ijwhost.cs | Added a test to validate that components in the working directory are not used. |
src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs | Added a test to verify that hosting binaries from the working directory are not used during activation. |
No description provided.