From bfbccddd81527234e66b9eabe03a81d32bf89db2 Mon Sep 17 00:00:00 2001 From: Alexander Qi Date: Sun, 14 Jan 2024 11:52:20 +0800 Subject: [PATCH] clone: fix stack use after scope --- linux-user/syscall.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5772a1c444..c74c4adbd2 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6563,9 +6563,10 @@ static void *clone_func(void *arg) libafl_qemu_env = env; if (libafl_new_thread_hooks) { bool continue_execution = true; + int tid = sys_gettid(); struct libafl_new_thread_hook* h = libafl_new_thread_hooks; while (h) { - continue_execution = h->callback(h->data, info->tid) && continue_execution; + continue_execution = h->callback(h->data, tid) && continue_execution; h = h->next; } if (continue_execution) cpu_loop(env);