From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Another SIGFPE in display code, now in cirrus Date: Thu, 13 May 2010 09:36:47 +0200 Message-ID: <4BEBAC0F.8010900@redhat.com> References: <4BE32178.2090103@msgid.tls.msk.ru> <4BE7B8C1.9060807@redhat.com> <4BE7C0A5.3090909@redhat.com> <4BEAA0CC.4090906@redhat.com> <4BEABABC.6080305@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Avi Kivity , Michael Tokarev , KVM list , qemu-devel , Brian Kress To: Stefano Stabellini Return-path: Received: from mail-ww0-f46.google.com ([74.125.82.46]:49059 "EHLO mail-ww0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753418Ab0EMHgw (ORCPT ); Thu, 13 May 2010 03:36:52 -0400 Received: by wwi18 with SMTP id 18so636119wwi.19 for ; Thu, 13 May 2010 00:36:50 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: On 05/12/2010 05:57 PM, Stefano Stabellini wrote: > I guess even a src blt pitch of 0 could be useful there, however in > practice I think the only rop function that was written with this case in > mind has: > > dstpitch -= bltwidth; > srcpitch -= bltwidth; > > if (dstpitch< 0 || srcpitch< 0) { > /* is 0 valid? srcpitch == 0 could be useful */ > return; > } Note that here srcpitch == 0 is actually srcpitch == bltwidth, which _is_ obviously useful. The "real" srcpitch == 0 case would result in srcpitch == -bltwidth, and it is actually quite useful if you want to stretch a Nx1 bitmap to NxN. Paolo