-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Stop guessing if a type is blittable #102645
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
Conversation
Fixes dotnet#75666. CoreLib was making an assumption that if a type didn't have pregenerated interop data and it didn't have GC pointers, it was probably blittable. This PR stops making that guess. We're generating an AOT warning whenever the compiler is not sure we have interop data to make an API call succeed. It should be fine to just say "I don't have interop data" instead of trying too hard to make the API call succeed.
|
/azp run runtime-nativeaot-outerloop |
|
We added some tests in 95d9425. Can we add some more cases if they were missing? (assuming those tests are running the in CI). |
|
Azure Pipelines successfully started running 1 pipeline(s). |
We have tests, I ran into this in the CoreCLR pri-1 test suite that I'm in the process of enabling in the CI. |
.../nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs
Outdated
Show resolved
Hide resolved
.../nativeaot/System.Private.CoreLib/src/Internal/Runtime/CompilerHelpers/RuntimeInteropData.cs
Outdated
Show resolved
Hide resolved
|
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
ARM32 outerloop is broken in main, so unrelated: #102715. |
jkotas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Fixes dotnet#75666. CoreLib was making an assumption that if a type didn't have pregenerated interop data and it didn't have GC pointers, it was probably blittable. This PR stops making that guess. We're generating an AOT warning whenever the compiler is not sure we have interop data to make an API call succeed. It should be fine to just say "I don't have interop data" instead of trying too hard to make the API call succeed.
Fixes #75666.
CoreLib was making an assumption that if a type didn't have pregenerated interop data and it didn't have GC pointers, it was probably blittable. This PR stops making that guess. We're generating an AOT warning whenever the compiler is not sure we have interop data to make an API call succeed. It should be fine to just say "I don't have interop data" instead of trying too hard to make the API call succeed.
Cc @dotnet/ilc-contrib