Преглед изворни кода

[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 пре 5 година
родитељ
комит
74ce0ae3e1
1 измењених фајлова са 1 додато и 1 уклоњено
  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,