qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 2/2] Monitor: Make output buffer dynamic
Date: Mon, 25 Mar 2013 17:44:47 -0400

On Mon, 25 Mar 2013 22:07:36 +0100
Paolo Bonzini <address@hidden> wrote:

> Il 25/03/2013 20:40, Luiz Capitulino ha scritto:
> > Commit f628926bb423fa8a7e0b114511400ea9df38b76a changed monitor_flush()
> > to retry on qemu_chr_fe_write() errors. However, the Monitor's output
> > buffer can keep growing while the retry is not issued and this can
> > cause the buffer to overflow.
> > 
> > To reproduce this issue, just start qemu and type on the Monitor:
> > 
> > (qemu) ?
> > 
> > This will cause the assertion to trig.
> > 
> > To fix this problem this commit makes the Monitor buffer dynamic,
> > which means that it can grow as much as needed.
> 
> What about using a GString instead?

Makes no difference for me (although I don't enjoy mixing QString and GString
in the same module), but if we do this with the goal of stopping QString
proliferation then we should note somewhere that it shouldn't be used in
new code anymore.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]