Skip to content
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

Fix auto layout algorithm to compute structure alignment correctly #73738

Merged
merged 7 commits into from
Aug 17, 2022

Commits on Aug 10, 2022

  1. New test

    davidwrighton committed Aug 10, 2022
    Configuration menu
    Copy the full SHA
    74935a1 View commit details
    Browse the repository at this point in the history

Commits on Aug 11, 2022

  1. Fix auto layout algorithm to compute structure alignment correctly

    - In particular:
      1. The alignment requirement imposed by of a non-primitive, non-enum valuetype field is the alignment of that field
      2. The alignment requirement imposed by a primitive is the pointer size of the target platform, unless running on Arm32, in which case if the primitive or enum is 8 bytes in size, the alignment requirement is 8.
    
    - The previous implementation produced an alignment of pointer size, unless running on Arm32 and one of the fields had an alignment requirement of 8 (in which case the alignment requirement computed for the structure would be 8)
    
    In addition, add a test which verifies that the instance field layout test types are actually producing R2R compatible results at runtime.
     - This test shows that we have some issues around explicit layout, so I was forced to disable that portion of the test for now.
    
    Fixes dotnet#65281
    davidwrighton committed Aug 11, 2022
    Configuration menu
    Copy the full SHA
    be730bc View commit details
    Browse the repository at this point in the history
  2. Re-enable disabled test

    davidwrighton committed Aug 11, 2022
    Configuration menu
    Copy the full SHA
    e599574 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3ef8ee4 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0cdf40b View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2022

  1. Configuration menu
    Copy the full SHA
    ebb920c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    174590f View commit details
    Browse the repository at this point in the history