Skip to content
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

[release/6.0][mono][interp] Fix GetType called on ptr constrained to Nullable` (#6… #61305

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

BrzVlad
Copy link
Member

@BrzVlad BrzVlad commented Nov 8, 2021

Backport of #61020 to release/6.0

Customer Impact

Found by a customer, object.GetType() functions incorrectly on Nullable types in the interpreter.

Testing

Manual and CI

Regression

Yes, the regression was introduced this year.

Risk

Low. Regression introduced in net6.0

…tnet#61020)

* [interp] Fix GetType called on ptr constrained to Nullable`

We were statically optimizing this call to return the actual constrained class type, which is incorrect for nullables, because boxing of a nullable (as part of the constrained call) actually creates an object with the type of the nullable's value (or null if there is no value).

* Add test for GetType call on ptr constrained to nullable
@ghost
Copy link

ghost commented Nov 8, 2021

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #61020 to release/6.0

Fixes #61007

Customer Impact

Found by a customer, object.GetType() functions incorrectly on Nullable types in the interpreter.

Testing

Manual

Regression

Yes, the regression was introduced this year.

Risk

Low. Regression introduced in net6.0

Author: BrzVlad
Assignees: -
Labels:

area-Codegen-Interpreter-mono

Milestone: -

@BrzVlad BrzVlad changed the title [mono][interp] Fix GetType called on ptr constrained to Nullable` (#6… [release/6.0][mono][interp] Fix GetType called on ptr constrained to Nullable` (#6… Nov 8, 2021
@BrzVlad
Copy link
Member Author

BrzVlad commented Nov 8, 2021

@lewing Re-created this PR manually since github actions seemed to fail the second time

@ghost
Copy link

ghost commented Nov 11, 2021

Tagging subscribers to this area: @BrzVlad
See info in area-owners.md if you want to be subscribed.

Issue Details

Backport of #61020 to release/6.0

Fixes #61007

Customer Impact

Found by a customer, object.GetType() functions incorrectly on Nullable types in the interpreter.

Testing

Manual

Regression

Yes, the regression was introduced this year.

Risk

Low. Regression introduced in net6.0

Author: BrzVlad
Assignees: -
Labels:

Servicing-consider, area-Codegen-Interpreter-mono

Milestone: -

@lewing lewing added this to the 6.0.x milestone Nov 11, 2021
@lewing lewing added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Nov 11, 2021
@Anipik
Copy link
Contributor

Anipik commented Nov 11, 2021

/azp run runtime-staging, dotnet-linker-tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Anipik Anipik merged commit 443ab80 into dotnet:release/6.0 Nov 12, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Dec 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants