Loads stolen reg with TLS base address before entering exit stub after synchall.
Fixes linux.thread-reset
and linux.clone-reset
tests which should fail on AArch64 due to missing stolen reg load but don't. Adds a new option to reset_at_created_thread_count
and use that instead of reset_at_fragment_count
. This was required because the latter requires to be tuned to make sure that reset happens when multiple threads are active; otherwise, the failing path is not invoked at all. Also, the ideal reset_at_fragment_count
value is different for x86 and AArch64. Using reset_at_created_thread_count
makes these tests more robust.
Fixes: #4497 (closed)