Merge pull request #44 from xdqi/main

clone: fix stack use after scope
This commit is contained in:
Andrea Fioraldi 2024-01-14 16:38:56 +01:00 committed by GitHub
commit de3e3f15ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6563,9 +6563,10 @@ static void *clone_func(void *arg)
libafl_qemu_env = env; libafl_qemu_env = env;
if (libafl_new_thread_hooks) { if (libafl_new_thread_hooks) {
bool continue_execution = true; bool continue_execution = true;
int tid = sys_gettid();
struct libafl_new_thread_hook* h = libafl_new_thread_hooks; struct libafl_new_thread_hook* h = libafl_new_thread_hooks;
while (h) { while (h) {
continue_execution = h->callback(h->data, info->tid) && continue_execution; continue_execution = h->callback(h->data, tid) && continue_execution;
h = h->next; h = h->next;
} }
if (continue_execution) cpu_loop(env); if (continue_execution) cpu_loop(env);