Move asan_fake_stack_handle to EC, not thread

It's really a property of the EC; each fiber (which has its own EC) also
has its own asan_fake_stack_handle.

[Bug #20310]
This commit is contained in:
KJ Tsanaktsidis 2024-02-24 19:31:27 +11:00
parent ea31228d0c
commit 48d3bdddba
4 changed files with 6 additions and 9 deletions

View file

@ -2081,6 +2081,7 @@ native_thread_init_stack(rb_thread_t *th, void *local_in_parent_frame)
rb_nativethread_id_t curr = pthread_self();
#ifdef RUBY_ASAN_ENABLED
local_in_parent_frame = asan_get_real_stack_addr(local_in_parent_frame);
th->ec->machine.asan_fake_stack_handle = asan_get_thread_fake_stack_handle();
#endif
if (!native_main_thread.id) {