public inbox for sid@sourceware.org
 help / color / mirror / Atom feed
* [RFA] Avoid write queue overflow in mep.cxx
@ 2009-05-16  0:33 Kevin Buettner
  2009-05-18 20:40 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Buettner @ 2009-05-16  0:33 UTC (permalink / raw)
  To: sid

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);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFA] Avoid write queue overflow in mep.cxx
  2009-05-16  0:33 [RFA] Avoid write queue overflow in mep.cxx Kevin Buettner
@ 2009-05-18 20:40 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2009-05-18 20:40 UTC (permalink / raw)
  To: sid

On Fri, 15 May 2009 17:33:29 -0700
Kevin Buettner <kevinb@redhat.com> wrote:

> 	* mep.cxx (mep_cpu::reset): Call `h_regs_flush_write_queue'.

Committed.  (FChE approved it off-list.)

Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-18 20:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-16  0:33 [RFA] Avoid write queue overflow in mep.cxx Kevin Buettner
2009-05-18 20:40 ` Kevin Buettner

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).