This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] Avoid race condition when handling a SIGWINCH signal
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Wed, 13 May 2015 11:45:56 -0400
- Subject: [binutils-gdb] Avoid race condition when handling a SIGWINCH signal
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 1e04046d0b7e0f87bc6e2fefd966c9dd89d2ce13 ***
Author: Patrick Palka <patrick@parcs.ath.cx>
Branch: master
Commit: 1e04046d0b7e0f87bc6e2fefd966c9dd89d2ce13
Avoid race condition when handling a SIGWINCH signal
The control variable win_resized must be cleared before responding to
it.
Otherwise there is a small window where another SIGWINCH might occur in
between the handling of an earlier SIGWINCH and the clearing of
win_resized, at which point win_resized would be set (again) by the
signal handler. Shortly thereafter we would clear win_resized even
though we only handled the earlier SIGWINCH but not the latest one.
This chain of events is all avoided if we clear win_resized first.
gdb/ChangeLog:
* tui/tui-win.c (tui_async_resize_screen): Clear win_resized
first before resizing the window.
* tui.c (tui_enable): Likewise.
- Follow-Ups:
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Debian-i686, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-gdbserver, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m32, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-x86_64-native-gdbserver-m32, branch master