-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[NativeAOT] Ensure that frozen objects respect the minimum object size #76031
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
|
It solves the problem but I am not sure about the preferred code organisation. I'd have preferred to use Also, once the details are ironed out, is this candidate for release/7.0 fix? |
src/coreclr/tools/aot/ILCompiler.Compiler/Compiler/TypePreinit.cs
Outdated
Show resolved
Hide resolved
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.
LGTM. Thank you!
|
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
The failures are #75699 |
|
/backport to release/7.0 |
|
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3109813547 |
|
@filipnavara Thank you! |
|
Thanks for help with it! |
Ref: #75421 (comment)
When System.Memory.Tests was compiled with NativeAOT it produced incorrect data in the frozen heap section for some empty objects:
First object:
Next object:
The dumped vtable of the first object:
Second word is the size (
0x00000018) but the difference between the address of the two objects in the data is only 0x10. This fixes the IL Compiler to properly align empty objects and prevents a GC crash as runtime.