diff options
author | Tom Tromey <tromey@adacore.com> | 2024-02-23 08:59:40 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-02-28 09:08:16 -0700 |
commit | 8bb8f8346729c35433c961f7f1ed3a801776a362 (patch) | |
tree | 16018f54edb869c5d52ac3ad4486355d71758e50 /zlib/win32 | |
parent | 4b72a278f46245635ca03ffc8179570c07e3531a (diff) | |
download | gdb-8bb8f8346729c35433c961f7f1ed3a801776a362.zip gdb-8bb8f8346729c35433c961f7f1ed3a801776a362.tar.gz gdb-8bb8f8346729c35433c961f7f1ed3a801776a362.tar.bz2 |
Fix gdb.interrupt race
gdb.interrupt was introduced to implement DAP request cancellation.
However, because it can be run from another thread, and because I
didn't look deeply enough at the implementation, it turns out to be
racy.
The fix here is to lock accesses to certain globals in extension.c.
Note that this won't work in the case where configure detects that the
C++ compiler doesn't provide thread support. This version of the
patch disables DAP entirely in this situation.
Regression tested on x86-64 Fedora 38. I also ran gdb.dap/pause.exp
in a thread-sanitizer build tree to make sure the reported race is
gone.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31263
Diffstat (limited to 'zlib/win32')
0 files changed, 0 insertions, 0 deletions