Skip to content

Conversation

@yowl
Copy link
Contributor

@yowl yowl commented Jun 10, 2024

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 #2606

@yowl yowl closed this Jun 10, 2024
@yowl yowl reopened this Jun 10, 2024
@yowl
Copy link
Contributor Author

yowl commented Jun 10, 2024

cc @dotnet/nativeaot-llvm

@SingleAccretion
Copy link

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.

@maraf maraf added the area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly) label Jun 11, 2024
@yowl
Copy link
Contributor Author

yowl commented Jun 12, 2024

Not sure this is the simplest test, but it was failing.

Copy link

@SingleAccretion SingleAccretion left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you!

@maraf maraf merged commit e2a9332 into dotnet:feature/NativeAOT-LLVM Jun 12, 2024
dicej added a commit to dicej/wit-bindgen that referenced this pull request Jul 2, 2024
…ce#963)"

This reverts commit 3ca7739.

As of dotnet/runtimelab#2609, the "return pointer not
aligned" issue which forced us to remove the C# `variants` runtime test case
_should_ be resolved. 🤞

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
dicej added a commit to dicej/wit-bindgen that referenced this pull request Jul 8, 2024
…ce#963)"

This reverts commit 3ca7739.

As of dotnet/runtimelab#2609, the "return pointer not
aligned" issue which forced us to remove the C# `variants` runtime test case
_should_ be resolved. 🤞

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
github-merge-queue bot pushed a commit to bytecodealliance/wit-bindgen that referenced this pull request Jul 8, 2024
* Revert "temporarily remove C# `variants` runtime test (#963)"

This reverts commit 3ca7739.

As of dotnet/runtimelab#2609, the "return pointer not
aligned" issue which forced us to remove the C# `variants` runtime test case
_should_ be resolved. 🤞

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* update C# variants test to match latest code generator

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
github-merge-queue bot pushed a commit to bytecodealliance/wit-bindgen that referenced this pull request Jul 8, 2024
* Revert "temporarily remove C# `variants` runtime test (#963)"

This reverts commit 3ca7739.

As of dotnet/runtimelab#2609, the "return pointer not
aligned" issue which forced us to remove the C# `variants` runtime test case
_should_ be resolved. 🤞

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

* update C# variants test to match latest code generator

Signed-off-by: Joel Dice <joel.dice@fermyon.com>

---------

Signed-off-by: Joel Dice <joel.dice@fermyon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-NativeAOT-LLVM LLVM generation for Native AOT compilation (including Web Assembly)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants