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

Assert compiling dotnet/runtime in EmitConversions #67041

Closed
jaredpar opened this issue Feb 24, 2023 · 0 comments · Fixed by #67445
Closed

Assert compiling dotnet/runtime in EmitConversions #67041

jaredpar opened this issue Feb 24, 2023 · 0 comments · Fixed by #67445
Assignees
Labels
Area-Compilers Bug untriaged Issues and PRs which have not yet been triaged by a lead
Milestone

Comments

@jaredpar
Copy link
Member

jaredpar commented Feb 24, 2023

When compiling dotnet/runtime with the latest compiler we get an assert in EmitConversions.cs

Debug.Assert(
(toPredefTypeKind == Microsoft.Cci.PrimitiveTypeCode.IntPtr || toPredefTypeKind == Microsoft.Cci.PrimitiveTypeCode.UIntPtr) && !toType.IsNativeIntegerWrapperType ||
toPredefTypeKind == Microsoft.Cci.PrimitiveTypeCode.Pointer ||
toPredefTypeKind == Microsoft.Cci.PrimitiveTypeCode.FunctionPointer);

The assert occurs because the toPredefTypeKind is Int64.

The method which is causing the assert failure is here: https://github.com/dotnet/runtime/blob/f9ebd42d05ca88f086d472832487fbccfc7fe4ac/src/coreclr/tools/aot/ILCompiler.ReadyToRun/JitInterface/CorInfoImpl.ReadyToRun.cs#L2715

Found while digging into dotnet/runtime#82467

@jaredpar jaredpar added this to the 17.6 milestone Feb 24, 2023
@jaredpar jaredpar added the untriaged Issues and PRs which have not yet been triaged by a lead label Feb 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Bug untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants