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

Mono inconsistency in error case when using ExplicitThis when defining constructor #113839

Open
steveharter opened this issue Mar 24, 2025 · 1 comment
Labels
area-VM-meta-mono untriaged New issue has not been triaged by the area owner

Comments

@steveharter
Copy link
Member

This is a minor inconsistency for Mono compared to CoreClr found while adding tests for ExplicitThis calling convention, and this issue created mainly to add the [ActiveIssue] to test System.Reflection.Emit.Tests.TypeBuilderDefineConstructor.DefineConstructor_ExplicitThisCallingConventionsForInstanceMethod_ThrowsTypeLoadExceptionOnCreation()

That test does not fail on Mono, but on CoreClr fails with an expected TypeLoadException:

Unhandled exception. System.TypeLoadException: The signature is incorrect.
   at System.Reflection.Emit.RuntimeTypeBuilder.TermCreateClass(QCallModule module, Int32 tk, ObjectHandleOnStack type)
   at System.Reflection.Emit.RuntimeTypeBuilder.TermCreateClass(QCallModule module, Int32 tk, ObjectHandleOnStack type)
   at System.Reflection.Emit.RuntimeTypeBuilder.CreateTypeNoLock() in C:\git\rfp2\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs:line 1658
   at System.Reflection.Emit.RuntimeTypeBuilder.CreateTypeInfoImpl() in C:\git\rfp2\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs:line 1483
   at System.Reflection.Emit.RuntimeTypeBuilder.CreateTypeInfoCore() in C:\git\rfp2\src\coreclr\System.Private.CoreLib\src\System\Reflection\Emit\RuntimeTypeBuilder.cs:line 1473
   at System.Reflection.Emit.TypeBuilder.CreateTypeInfo() in C:\git\rfp2\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs:line 42
   at System.Reflection.Emit.TypeBuilder.CreateType() in C:\git\rfp2\src\libraries\System.Private.CoreLib\src\System\Reflection\Emit\TypeBuilder.cs:line 38
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Mar 24, 2025
@steveharter
Copy link
Member Author

See also this other Mono ExplicitThis issue: #113789.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-VM-meta-mono untriaged New issue has not been triaged by the area owner
Projects
None yet
Development

No branches or pull requests

2 participants