From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TX5mD-0002v7-GG for qemu-devel@nongnu.org; Sat, 10 Nov 2012 02:46:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TX5mA-0002fH-ED for qemu-devel@nongnu.org; Sat, 10 Nov 2012 02:46:49 -0500 Received: from chello084112167138.7.11.vie.surfer.at ([84.112.167.138]:40134 helo=wiesinger.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TX5m9-0002Yx-Hs for qemu-devel@nongnu.org; Sat, 10 Nov 2012 02:46:46 -0500 Message-ID: <509E0603.5060709@wiesinger.com> Date: Sat, 10 Nov 2012 08:45:07 +0100 From: Gerhard Wiesinger MIME-Version: 1.0 References: <509D059F.9000809@redhat.com> <201211100045.39497.marex@denx.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] ui/vnc.c: Fix crash with VNC List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Marek Vasut , Anthony Liguori , qemu-devel@nongnu.org, Gerd Hoffmann On 10.11.2012 00:52, Peter Maydell wrote: > On 10 November 2012 00:45, Marek Vasut wrote: >> Gerd Hoffmann wrote: >>> Question is just whenever we'll go silently fixup stuff in console.c or >>> use assert()s to enforce callers getting this correct. I'd tend to use >>> assert() as vmware-vga passing bogous stuff there IMHO indicates there >>> is a bug in vmware-vga. >> Or rather some revisions of the guest X driver. > If qemu's vmware-vga is blithely trusting what the guest driver > hands it then that is itself a bug... > > To answer Gerd's question, I think I'd go for clip rather than assert > (especially at this point in the release cycle), though I don't feel > very strongly about it. I'd go for clipping rather than asserting too (no crash) in all layers as a defensive approach (console.c/vnc.c). Additionally logging that condition would be helpful that the arising bug (which occurred several times with a lot of unapplied fixes) can be detected by users easily and fixed accordingly. Ciao, Gerhard