On 6/15/22 9:54 AM, Aleksey Shipilev wrote:
(I *suspect* that somewhere we stash the "current" thread onto stack, and then remount to another thread, which makes "current" thread obsolete. Assuming current thread does not change is quite pervasive, and saving "current thread" on architectures without dedicated thread register is rather common.)

That does sound like a problem. I noticed that SharedRuntime::generate_native_wrapper() does this:

1554    // We use rdi as a thread pointer because it is callee save and
1555    // if we load it once it is usable thru the entire wrapper
1556    const Register thread = rdi;

This comment seems wrong for loom.

dl

Reply via email to