Skip to content

Conversation

davidwrighton
Copy link
Member

  • The sort order of the Runtime Functions table (among others) was not properly handled when an optimized method layout was applied
    • While this bug applied to non-composite builds, it was easily reproduced with a composite build
  • Fix lack of test infrastructure around non-standard method layouts.
    • Add new random method sorting order
    • Use new random sorting order in crossgen2 test passes

Fixes #59089

- The sort order of the RuntimeFunctions table (among others) was not properly handled when an optimized method layout was applied
  - While this bug applied to non-composite builds, it was easily reproduced with a composite build
- Fix lack of test infrastructure around non-standard method layouts.
  - Add new random method sorting order
  - Use new random sorting order in crossgen2 test passes

Fixes dotnet#59089
@davidwrighton
Copy link
Member Author

@dotnet/crossgen-contrib

Copy link
Member

@trylek trylek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful, thank you!

@davidwrighton davidwrighton merged commit 5e5a1bd into dotnet:main Sep 30, 2021
#endif
return nodeComparerResult;
};
Comparison<IMethodNode> sortHelperNoCustomSort = (x, y) => comparer.Compare(x, y);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Comparison<IMethodNode> sortHelperNoCustomSort = (x, y) => comparer.Compare(x, y);
Comparison<IMethodNode> sortHelperNoCustomSort = comparer.Compare;

Less closures?

@davidwrighton
Copy link
Member Author

/backport to release/6.0

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2021

Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/1314579960

@ghost ghost locked as resolved and limited conversation to collaborators Nov 6, 2021
@davidwrighton davidwrighton deleted the fix_59089 branch April 13, 2023 18:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Internal CLR errors during delay load when using crossgen2 in composite mode with method layout

3 participants