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

[mono][llvm] Fix alignment of local vars #106313

Merged
merged 2 commits into from
Aug 13, 2024
Merged

Commits on Aug 13, 2024

  1. [mono][llvm] Fix alignment of local vars

    klass->min_align specifies the alignment required by the class fields. For example a class/struct containing an int64 will require a minimum alignment of 8 byte for its storage, while a a class/struct containing an int8 will require a 1 byte alignment. `build_named_alloca` is used to allocate storage for a local var of a certain type so using `klass->min_align` is incorrect. We should use `mono_type_size` instead, as this is used throughout the runtime for this purpose. A var of object type should have the alignment `sizeof (gpointer)` since it is a pointer, completely unrelated to the class field layout.
    BrzVlad committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    b73c981 View commit details
    Browse the repository at this point in the history
  2. Re-enable tests

    BrzVlad committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    aca293f View commit details
    Browse the repository at this point in the history