Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Don't prune the IManagedActivationFactory type #28061

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Jul 15, 2020

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

@AaronRobinsonMSFT AaronRobinsonMSFT added the Servicing-consider Issue for next servicing release review label Jul 15, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 3.1.7 milestone Jul 15, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT changed the title Don't prune the IManagedActivationFactory type - it is needed by WinUI. Don't prune the IManagedActivationFactory type Jul 15, 2020
@jeffschwMSFT jeffschwMSFT modified the milestones: 3.1.7, 3.1.x Jul 15, 2020
@jamshedd jamshedd added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 16, 2020
@jeffschwMSFT jeffschwMSFT modified the milestones: 3.1.x, 3.1.7 Jul 16, 2020
@jeffschwMSFT jeffschwMSFT merged commit e8b1784 into dotnet:release/3.1 Jul 16, 2020
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the retain_IManagedActivationFactory branch July 16, 2020 17:33
@jamshedd
Copy link
Member

Approved for 3.1.7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants