-
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
[release/8.0-staging] [Mono AOT] Fix error when returning zero sized struct #107198
[release/8.0-staging] [Mono AOT] Fix error when returning zero sized struct #107198
Conversation
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
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.
lgtm. we will take for consideration in 8.0.x
Friendly reminder that Code Complete for the October Release is September 9. If we want this fix to be included in that release, please merge this PR before that date. |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
/ba-g the runtime failures seem to be coming from browser-wasm linux Release WasmBuildTests #106663 . The runtime-extra-platforms fails are unrelated. |
Backport of #106013 to release/8.0-staging
/cc @jkurdek
Customer Impact
Customer reported #103628
The scenario is to use an
Auto
orSequential
layout struct with no fields as a return value of a method. Mono AOT compiler will fail in that case (the compiler itself will fail). The only workaround is to change the struct to not be auto/sequential.This caused different compilation failures on both
ArgVTypeAsScalar
andArgVTypeInReg
codepaths. Fix forArgVTypeAsScalar
path involved rounding up a struct to one byte when empty. This matches a behaviour of not specifying a layout attribute on the struct. (#103628) TheArgVTypeInReg
produces malformed LLVM-IR. The fix was to align types. (#106259)Regression
Testing
New CI regression test.
Risk
Low. Any potential issues which this fix could introduce would be for scenarios where the compiler failed previously.