This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
Don't prune the IManagedActivationFactory type #28061
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes a user reported issue for consuming XAML Islands in .NET 3.1. The result is a random failure typically during XAML load. The managed definition of
IManagedActivationFactory
has been pruned of its function and thus when a call is made to a class implementing that interface, random memory is executed since there is no entry in the vtable.The scenario involving this code was removed in .NET 5.0 so there is no need to bring the work forward.
Customer Impact
Users will be unable to use XAML Islands or WinUI with bindings in .NET 3.1.
Workaround
There is no work around. The Linker removed the function definition and single implementation in question - they no longer exist in the assembly to call.
Regression?
This is probably a regression, but I have not identified the exact location where the break was introduced.
Confirmed the method is missing and broken in 3.0.1, but the method is present in 2.2.7.
Testing
Validated a patched version of
System.Private.CoreLib
against a XAML Island scenario from https://github.com/microsoft/Xaml-Islands-Samples.Risk
Low.
/cc @jeffschwMSFT @jkotas @jkoritzinsky