From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSho3-0002Bs-UT for qemu-devel@nongnu.org; Mon, 08 Feb 2016 04:08:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aShny-0003VF-Ui for qemu-devel@nongnu.org; Mon, 08 Feb 2016 04:08:27 -0500 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:33782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aShny-0003VB-Ms for qemu-devel@nongnu.org; Mon, 08 Feb 2016 04:08:22 -0500 Received: by mail-wm0-x232.google.com with SMTP id g62so123391477wme.0 for ; Mon, 08 Feb 2016 01:08:22 -0800 (PST) Sender: Paolo Bonzini References: <56AE260C.9020508@ilande.co.uk> <56AE2E1B.6030106@ilande.co.uk> From: Paolo Bonzini Message-ID: <56B85AFC.3070604@redhat.com> Date: Mon, 8 Feb 2016 10:08:12 +0100 MIME-Version: 1.0 In-Reply-To: <56AE2E1B.6030106@ilande.co.uk> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Strange monitor/stdout issue on qemu-system-sparc/qemu-system-ppc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , Peter Maydell Cc: qemu-devel On 31/01/2016 16:54, Mark Cave-Ayland wrote: > Aha! A quick test here shows that the patch fixes the serial port > appearing on stdout and entering the monitor, but I still see the > multiple echo problem in the GTK GUI. And this should be it; if this fixes all your problems I will submit it for inclusion. Thanks, Paolo ----------------- 8< --------------- From: Paolo Bonzini Subject: [PATCH] gtk: fix uninitialized temporary VirtualConsole Only the echo field is used in the temporary VirtualConsole, so the damage was limited. But still, if echo was incorrectly set to true, the result would be some puzzling output in VTE monitor and serial consoles. Fixes: fba958c692e47a373d15c1fd3d72b255bf76adbd Signed-off-by: Paolo Bonzini diff --git a/ui/gtk.c b/ui/gtk.c index c8dbd5c..e106493 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -1612,7 +1612,7 @@ static CharDriverState *gd_vc_handler(ChardevVC *vc, Error **errp) chr->chr_set_echo = gd_vc_chr_set_echo; /* Temporary, until gd_vc_vte_init runs. */ - chr->opaque = g_new(VirtualConsole, 1); + chr->opaque = g_new0(VirtualConsole, 1); /* defer OPENED events until our vc is fully initialized */ chr->explicit_be_open = true;