Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Auto layout algorithm doesn't compute the right size #6665

@MichalStrehovsky

Description

@MichalStrehovsky

Found when I was running the tests Tanner added in dotnet/coreclr#15961 (while half of the tests focuses on Vector64/128/256, the second half is a general purpose test and we're failing computing the right sizes).

I have a fix that is halfway there in MichalStrehovsky@7f94460.

What it lacks is handling of Align8 and unit tests.

For the record, here's the relevant part of the output of Tanner's test:

Unexpected Size for AutoLayoutMinPacking`1[System.Char].
     Expected: 4; Actual: 3

Unexpected Size for AutoLayoutMinPacking`1[System.Double].
     Expected: 16; Actual: 9

Unexpected Size for AutoLayoutMinPacking`1[System.Int16].
     Expected: 4; Actual: 3

Unexpected Size for AutoLayoutMinPacking`1[System.Int32].
     Expected: 8; Actual: 5

Unexpected Size for AutoLayoutMinPacking`1[System.Int64].
     Expected: 16; Actual: 9

Unexpected Size for AutoLayoutMinPacking`1[System.IntPtr].
     Expected: 16; Actual: 9

Unexpected Size for AutoLayoutMinPacking`1[System.Single].
     Expected: 8; Actual: 5

Unexpected Size for AutoLayoutMinPacking`1[System.UInt16].
     Expected: 4; Actual: 3

Unexpected Size for AutoLayoutMinPacking`1[System.UInt32].
     Expected: 8; Actual: 5

Unexpected Size for AutoLayoutMinPacking`1[System.UInt64].
     Expected: 16; Actual: 9

Unexpected Size for AutoLayoutMinPacking`1[System.UIntPtr].
     Expected: 16; Actual: 9

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions