Uh oh!
There was an error while loading. Please reload this page.
[NativeAOT] Ensure that frozen objects respect the minimum object size - #76031
Conversation
filipnavara
commented
Sep 22, 2022
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? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
jkotas
commented
Sep 22, 2022
/azp run runtime-extra-platforms |
|
Azure Pipelines successfully started running 1 pipeline(s). |
jkotas
commented
Sep 23, 2022
The failures are #75699 |
jkotas
commented
Sep 23, 2022
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3109813547 |
jkotas
commented
Sep 23, 2022
@filipnavara Thank you! |
filipnavara
commented
Sep 23, 2022
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.