Closed yowl closed 3 weeks ago
cc @dotnet/nativeaot-llvm
Can we add a test that reliable fails without this change and reliably passes with this change?
Idea: since objects are allocated next to each other, usually, and thread static bases are allocated lazily, check that if we access thread statics of three types, A
, B
and C
, where A
and C
need to be 8-aligned, while B
has an 'odd' size (three pointers, so, just an int
thread static field, for example), both A
and C
get aligned properly.
Not sure this is the simplest test, but it was failing.
This PR is a workaround to align all thread statics to 8 byte boundary to ensure those statics that do require 8 byte alignment are aligned.
Follows https://github.com/dotnet/runtimelab/issues/2606