Parcourir la source

[LibOS] Copy signal handler's __kernel_sigaction in get_new_thread()

Previously, there was a bug in copy of the shim_thread::signal_handles[].action
due to sizeof on the wrong type (shim_signal_handle instead of __kernel_sigaction).
This led to incomplete action object in signal_handles[].
Isaku Yamahata il y a 5 ans
Parent
commit
74ce0ae3e1
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      LibOS/shim/src/bookkeep/shim_thread.c

+ 1 - 1
LibOS/shim/src/bookkeep/shim_thread.c

@@ -206,7 +206,7 @@ struct shim_thread * get_new_thread (IDTYPE new_tid)
 
             thread->signal_handles[i].action =
                     malloc_copy(cur_thread->signal_handles[i].action,
-                                sizeof(struct shim_signal_handle));
+                                sizeof(*thread->signal_handles[i].action));
         }
 
         memcpy(&thread->signal_mask, &cur_thread->signal_mask,