[PATCH 0/7] GDB busy loop when interrupting non-stop program (PR 26199)
Mon Jul 6 21:28:43 GMT 2020
On 2020-07-06 3:02 p.m., Pedro Alves wrote:
> This patch series fixes PR 26199, a GDB 10 blocker.
> I discussed how to fix this with Simon, and we came to the conclusion
> that we can fix it by removing code. Easy. :-) That's the last patch
> in the series.
> Well, not so easy, actually... :-/
> Doing that alone caused gdb.multi/multi-target.exp to regress. And
> the reason was that the fix for PR 261299 made that testcase trip on a
> few latent bugs... One of those bugs also caused a similar 100% cpu
> busy loop.
> And then, while fixing those, I added a new test scenario to
> gdb.multi/multi-target.exp to exercise the TARGET_WAITKIND_NO_RESUMED
> handling fixes in this series. That new test requires sending Ctrl-C
> to GDB after the test is done with, in order to cleanly kill gdbserver
> via "monitor exit". But, that Ctrl-C didn't work, due to an issue
> with GDB's terminal handling, GDB would just hang...
> That's all fixed by this series.
> Pedro Alves (6):
> Fix spurious unhandled remote %Stop notifications
> Fix latent bug in target_pass_ctrlc
> Avoid constant stream of TARGET_WAITKIND_NO_RESUMED
> Fix handle_no_resumed w/ multiple targets
> Make handle_no_resumed transfer terminal
> Testcase for previous handle_no_resumed fixes
> Simon Marchi (1):
> Fix GDB busy loop when interrupting non-stop program (PR 26199)
> gdb/infrun.c | 116 +++++++++++++++++++++----------
> gdb/remote.c | 15 +++-
> gdb/target.c | 2 +-
> gdb/testsuite/gdb.multi/multi-target.c | 4 +-
> gdb/testsuite/gdb.multi/multi-target.exp | 76 ++++++++++++++++++++
> 5 files changed, 173 insertions(+), 40 deletions(-)
> base-commit: ad8464f799a4c96c7ab8bdfec3f95846cf54f9b0
I am not sure why I didn't see this earlier, but gdb.multi/multi-target.exp
fails for me with my ASan-enabled build, using current master. There is
a use after free. Do you see the same? I've attached the ASan log.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 8581 bytes
Desc: not available
More information about the Gdb-patches