From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=40607 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OCTSe-0002WY-0y for qemu-devel@nongnu.org; Thu, 13 May 2010 04:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OCSyY-0003Qs-Lk for qemu-devel@nongnu.org; Thu, 13 May 2010 03:37:01 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:41705) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OCSyS-0003PW-Tj for qemu-devel@nongnu.org; Thu, 13 May 2010 03:36:53 -0400 Received: by wyf19 with SMTP id 19so677339wyf.4 for ; Thu, 13 May 2010 00:36:50 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4BEBAC0F.8010900@redhat.com> Date: Thu, 13 May 2010 09:36:47 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <4BE32178.2090103@msgid.tls.msk.ru> <4BE7B8C1.9060807@redhat.com> <4BE7C0A5.3090909@redhat.com> <4BEAA0CC.4090906@redhat.com> <4BEABABC.6080305@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Another SIGFPE in display code, now in cirrus List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefano Stabellini Cc: Brian Kress , Michael Tokarev , Avi Kivity , KVM list , qemu-devel 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