From: Kevin Buettner <kevinb@redhat.com>
To: sid@sourceware.org
Subject: [RFA] Avoid write queue overflow in mep.cxx
Date: Sat, 16 May 2009 00:33:00 -0000 [thread overview]
Message-ID: <20090515173329.750f156b@redhat.com> (raw)
It's not uncommon for certain test cases in the GDB test suite to
connect to sid and then disconnect without executing anything. If
this happens enough times in a row, the invocations of mep_cpu::reset
will cause the write queues to overflow into some other data
structure, eventually causing a SIGSEGV.
The patch below fixes this problem.
Okay?
* mep.cxx (mep_cpu::reset): Call `h_regs_flush_write_queue'.
Index: mep.cxx
===================================================================
RCS file: /cvs/src/src/sid/component/cgen-cpu/mep/mep.cxx,v
retrieving revision 1.3
diff -u -p -r1.3 mep.cxx
--- mep.cxx 30 Apr 2009 21:18:37 -0000 1.3
+++ mep.cxx 16 May 2009 00:21:38 -0000
@@ -413,6 +413,8 @@ mep_cpu::reset ()
repeat_delayed_branch = false;
bit_insn_p = false;
+ h_regs_flush_write_queue ();
+
// Clear general purpose registers.
for (int i = 0; i < 16; i++)
h_gpr_set (i, 0);
next reply other threads:[~2009-05-16 0:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-16 0:33 Kevin Buettner [this message]
2009-05-18 20:40 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090515173329.750f156b@redhat.com \
--to=kevinb@redhat.com \
--cc=sid@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).