[PATCH] ntdll: Block SIGTRAP during server calls.

Huw Davies huw at codeweavers.com
Mon Oct 15 09:08:50 CDT 2018


This prevents issues with gdbproxy, where gdb adds breakpoints to
the dynamic loader which get triggered on thread destruction.
It also allows setting a gdb breakpoint in sigaction().

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45070
Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 dlls/ntdll/server.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index ec03445..689f0e7 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -1399,6 +1399,9 @@ void server_init_process(void)
     sigaddset( &server_block_set, SIGUSR1 );
     sigaddset( &server_block_set, SIGUSR2 );
     sigaddset( &server_block_set, SIGCHLD );
+#ifdef SIGTRAP
+    sigaddset( &server_block_set, SIGTRAP );
+#endif
     pthread_sigmask( SIG_BLOCK, &server_block_set, NULL );
 
     /* receive the first thread request fd on the main socket */
-- 
2.7.4




More information about the wine-devel mailing list