Skip to content

Conversation

@swesonga
Copy link
Member

On Windows, r18_tls is used store the pointer to the current thread's TEB. Therefore, this register should never be modified (see details in register_aarch64.hpp). This issue was identified when investigating hangs and crashes in the virtual threads on the Windows AArch64 jdk25u build. See microsoft/openjdk-jdk25u#19 for details.

/*
Do not modify r18_tls when restoring registers on Windows as it is used to
store the pointer to the current thread's TEB (where TLS variables are stored).
See r18_tls comment in register_aarch64.hpp.
Copy link
Member

Choose a reason for hiding this comment

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

Future proofing, will that comment be there permanently? Might be worth inlining the minimum details here.

@swesonga swesonga merged commit b542bac into ms-patches/win-aarch64-fixes Dec 16, 2025
62 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants