util: Don't block SIGSEGV for new threads
SIGSEGV is used by Vulkan API trace layers to track user changes in device memory mapped to user space. Now with drivers such as Zink, GLES applications are translated into Vulkan API calls and therefore it is possible to be tracked by Vulkan api trace layers. Blocking SIGSEGV hinders one of the memory tracking mechanisms used by such layers. Reviewed-by: Marek Olšák <marek.olsak@amd.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17273>
This commit is contained in:
parent
1442861141
commit
6f0aba42ad
|
@ -109,6 +109,12 @@ static inline int u_thread_create(thrd_t *thrd, int (*routine)(void *), void *pa
|
|||
|
||||
sigfillset(&new_set);
|
||||
sigdelset(&new_set, SIGSYS);
|
||||
|
||||
/* SIGSEGV is commonly used by Vulkan API tracing layers in order to track
|
||||
* accesses in device memory mapped to user space. Blocking the signal hinders
|
||||
* that tracking mechanism.
|
||||
*/
|
||||
sigdelset(&new_set, SIGSEGV);
|
||||
pthread_sigmask(SIG_BLOCK, &new_set, &saved_set);
|
||||
ret = thrd_create(thrd, routine, param);
|
||||
pthread_sigmask(SIG_SETMASK, &saved_set, NULL);
|
||||
|
|
Loading…
Reference in New Issue