-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
System.TypeLoadException from static field #100950
Comments
See #79636 |
Found this following that trail: #6924 (comment) - I see no other issue for it |
Duplicate of #88030 |
Actually, that issue, while very similar, is not exactly the same as this one - in the other one the generic parameter is not actually used, whereas for |
/cc @fanyang-mono |
Closing as it's a duplicate of #104511 |
This looks like it's actually different from 104511 somehow. Not sure what's going on yet. EDIT: This one fails an assertion starting at runtime/src/coreclr/vm/methodtablebuilder.cpp Line 10065 in 2c77535
because the two sizes don't match at runtime/src/coreclr/vm/methodtablebuilder.cpp Line 10088 in 2c77535
and then it throws a special type loading exception despite the use of tkTypeDefToAvoidIfPossible to avoid S1.The type load failure initially appears to be because the layout comparison here failed and iRecursiveGenericFieldHandlingPass == 1 :runtime/src/coreclr/vm/siginfo.cpp Line 1608 in 2c77535
|
Description
The runtime seems to throw a
System.TypeLoadException
on a structS1
with a static field of typeNullable<S1>
.Reproduction Steps
Run the following code:
https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwMoEYB0ANAFASgG4BYAKDIGdhIBjYAAgzIG8z736AHMASwDcAhsACm9AALoAbI3QB+egH0K6EqQ7iAzOKniALPTz56zegF8y50kA==
Expected behavior
Does not crash
Actual behavior
Crashes:
Regression?
No response
Known Workarounds
No response
Configuration
Windows 10.0.19045.4291 x64
.NET 8.0.4
And Sharplab.io
Other information
No response
The text was updated successfully, but these errors were encountered: