Skip to content

[NativeAOT] __GetFieldHelper emitted for simple contiguous struct #111542

Open
@NinoFloris

Description

Description

__GetFieldHelper emitted for simple contiguous struct.

Reproduction Steps

Some examples:

struct NoHelper
{
    long _one;
    long _two;
}

struct Helper
{
    long _one;
    int _two;
}

struct AlsoNoHelper
{
    long _one;
    int _two;
    int _three;
}

Expected behavior

No __GetFieldHelper emitted for Helper

Actual behavior

Publishing this Helper shows the __GetFieldHelper override in sizoscope.

I'm assuming this is due to the struct alignment introducing padding.
This likely causes the OverlappingFieldTracker to report there are gaps in the struct.

As far as I understand it all padding introduced will be zeroed, so there should be no reason to disable the memcompare implementation.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions