Skip to content

[release/5.0-rc2] Fix issue with covariant return method validation #41734

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

Merged
merged 1 commit into from
Sep 3, 2020

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 2, 2020

Backport of #41703 to release/5.0-rc2

/cc @janvorli

Customer Impact

Valid applications using covariant returns may fail with TypeLoadException.

Testing

Local testing via coreclr pri1 tests and libraries tests.

Risk

Low

The ClassLoader::ValidateMethodsWithCovariantReturnTypes was being called
from a place where the relevant types were sometimes not fully loaded yet.
That resulted in an attempt to load the type being loaded recursively,
which was detected and the TypeLoadException was thrown.
This change fixes it by moving the call to the
ClassLoader::ValidateMethodsWithCovariantReturnTypes to the PushFinalLevels
when the level is greater than CLASS_LOAD_EXACTPARENTS, which is the
last stage of normal loading.
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. I will take this for consideration

@jeffschwMSFT jeffschwMSFT added the Servicing-consider Issue for next servicing release review label Sep 3, 2020
@jamshedd jamshedd added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Sep 3, 2020
@jamshedd jamshedd modified the milestones: 5.0.0, 5.0.0 rc2 Sep 3, 2020
@jamshedd
Copy link
Member

jamshedd commented Sep 3, 2020

Approved for RC2.

@jeffschwMSFT jeffschwMSFT merged commit 3db725a into release/5.0-rc2 Sep 3, 2020
@jkotas jkotas deleted the backport/pr-41703-to-release/5.0-rc2 branch September 4, 2020 04:08
@karelz karelz modified the milestones: 5.0.0 rc2, 5.0.0 Sep 9, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-TypeSystem-coreclr Servicing-approved Approved for servicing release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants