Mark asan fake stacks during machine stack marking

ASAN leaves a pointer to the fake frame on the stack; we can use the
__asan_addr_is_in_fake_stack API to work out the extent of the fake
stack and thus mark any VALUEs contained therein.

[Bug #20001]
This commit is contained in:
KJ Tsanaktsidis 2023-11-12 16:19:31 +11:00
parent bdafad8790
commit d10bc3a2b8
8 changed files with 157 additions and 7 deletions

View file

@ -525,6 +525,9 @@ void
ruby_thread_init_stack(rb_thread_t *th, void *local_in_parent_frame)
{
native_thread_init_stack(th, local_in_parent_frame);
#ifdef RUBY_ASAN_ENABLED
th->asan_fake_stack_handle = asan_get_thread_fake_stack_handle();
#endif
}
const VALUE *