Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

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

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.
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

@am11
Copy link
Member

am11 commented May 24, 2024

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
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

We added some tests in 95d9425. Can we add some more cases if they were missing? (assuming those tests are running the in CI).

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.

@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MichalStrehovsky
Copy link
Member Author

ARM32 outerloop is broken in main, so unrelated: #102715.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@MichalStrehovsky MichalStrehovsky merged commit 3ae6f9e into dotnet:main May 27, 2024
@MichalStrehovsky MichalStrehovsky deleted the isblittable branch May 27, 2024 12:44
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
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.
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NativeAOT can report wrong sizes of native structs

3 participants