Merged
Conversation
|
Added When you commit this breaking change:
Tagging @dotnet/compat for awareness of the breaking change. |
Member
Author
|
/azp run runtime-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
lambdageek
reviewed
Nov 16, 2023
The CoreCLR type loader allowed creating arrays of System.Void. Many operations with these invalid array types failed, often in inscrutable ways. For example, GetInterfaces() call failed with type load exception of IEnumerable type. The exact failure modes are different between runtimes. It is better to disallow creating these invalid array types in the first place, across all runtimes, to make the behavior robust and consistent. Related to dotnet#88620 Fixes dotnet#94086
jkotas
commented
Nov 17, 2023
| klass->rank = GUINT32_TO_UINT8 (rank); | ||
| klass->element_class = eclass; | ||
|
|
||
| if (m_class_get_byval_arg (eclass)->type == MONO_TYPE_TYPEDBYREF) { |
Member
Author
There was a problem hiding this comment.
TypedReference is byreflike type, so it is not necessary to check for it explicitly here.
Member
|
I thought this was always disallowed. |
Member
Does that work with open generic types or pointers? |
Member
Author
Yes, it does. Pointers are special cased here: |
This was referenced Nov 17, 2023
Contributor
|
The mono changes look ok to me. |
Member
Author
|
Breaking change issue dotnet/docs#38311 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The CoreCLR type loader allowed creating arrays of
System.Void. Many operations with these invalid array types failed, often in inscrutable ways. For example,GetInterfaces()call failed with type load exception ofIEnumerable<void>type. The exact failure modes are different between runtimes.It is better to disallow creating these invalid array types in the first place, across all runtimes, to make the behavior robust and consistent.
Related to #88620
Fixes #94086