From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN87r-0003dz-Va for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:48:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UN87p-000544-L9 for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:48:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UN87p-00053n-CS for qemu-devel@nongnu.org; Tue, 02 Apr 2013 16:48:13 -0400 Message-ID: <515B4406.5070007@redhat.com> Date: Tue, 02 Apr 2013 14:48:06 -0600 From: Eric Blake MIME-Version: 1.0 References: <1364933897-25803-1-git-send-email-lcapitulino@redhat.com> <1364933897-25803-3-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1364933897-25803-3-git-send-email-lcapitulino@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="----enig2INJMJJEBIMFMKFFUDJQI" Subject: Re: [Qemu-devel] [PATCH 2/4] Monitor: Make output buffer dynamic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, fred.konrad@greensocs.com, kraxel@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2INJMJJEBIMFMKFFUDJQI Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04/02/2013 02:18 PM, Luiz Capitulino wrote: > 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. >=20 > To reproduce this issue, just start qemu and type on the Monitor: >=20 > (qemu) ? >=20 > This will cause an assertion to trig. >=20 > To fix this problem this commit makes the Monitor buffer dynamic, > which means that it can grow as much as needed. >=20 > Signed-off-by: Luiz Capitulino > --- > monitor.c | 45 ++++++++++++++++++++++++++++----------------- > 1 file changed, 28 insertions(+), 17 deletions(-) Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org ------enig2INJMJJEBIMFMKFFUDJQI Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJRW0QGAAoJEKeha0olJ0NqLa0H/icjxIUfjrjT+AsaOsPNwa/+ iwetlq+QZtkW39gc+CyTxWAYbdoZ8UaLTSwuWNCTTsHTkSxMU0J2XSdBBcvc6OcY PvLbO71wfMeYeALSl7iMoE6kNwokYWL8RgZWkSxGt5vqtn7pL8o0C2obsG2Vik3c GPZXZ1vUYpxm9ML+90jCp2rTyXK/ZgnVQWretjU4ua8q63tUH1biy3U8IFNX1s+I AwKERGLTSgoH79ZiaDHMzpbr3Q8Dzfu5pxGlpT9O+GesanG1qVtsUKGusolQdMRz 4w8aInuIjBhvcgtESor8p/VSIj+BR37WOZPmmLG8wS5WRWPDMnlRiUA0aMj0/nE= =ANbt -----END PGP SIGNATURE----- ------enig2INJMJJEBIMFMKFFUDJQI--