Received: from eggs.gnu.org ([2001:4830:134:3::10]:49691) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0z9Z-0004YC-PQ for qemu-devel@nongnu.org; Fri, 05 Jun 2015 17:27:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z0z9P-0002ul-UB for qemu-devel@nongnu.org; Fri, 05 Jun 2015 17:27:49 -0400 Received: from gateway04.websitewelcome.com ([67.18.125.4]:36054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z0z9P-0002u1-P8 for qemu-devel@nongnu.org; Fri, 05 Jun 2015 17:27:39 -0400 Received: from gator4003.hostgator.com (gator4003.hostgator.com [192.185.4.14]) by gateway04.websitewelcome.com (Postfix) with ESMTP id 00B845B65A9A0 for ; Fri, 5 Jun 2015 16:27:37 -0500 (CDT) Received: from clownix by gator4003.hostgator.com with local (Exim 4.82) (envelope-from ) id 1Z0z9M-0005Ue-Fu for qemu-devel@nongnu.org; Fri, 05 Jun 2015 16:27:36 -0500 Message-ID: <653eb73edec66f83353ac9daad416319.squirrel@gator4003.hostgator.com> Date: Fri, 5 Jun 2015 16:27:36 -0500 From: "perrier vincent" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] segfault caused by graphic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org For a lenny guest, using spice, with option vga=3Dcirrus, I had segfault = in: file: ui/spice-display.c function: qemu_spice_create_update(SimpleSpiceDisplay *ssd) in call to: if (memcmp(guest + yoff + xoff, mirror + yoff + xoff, bw * bpp) =3D=3D 0) After printing stuff, I discovered that the mirror address boundaries where not respected by mirror + yoff + xoff. Here is how I make my version run without segfault, it is not a correctio= n since I do not understand the working of the code, but this needs an official correction. ... img_get_stride =3D pixman_image_get_stride(ssd->mirror); img_height =3D pixman_image_get_height(ssd->mirror); img_max =3D img_height * img_get_stride; ... if (yoff > img_max) { if (dirty_top[blk] =3D=3D -1) { dirty_top[blk] =3D y; } } else if (memcmp(guest + yoff + xoff, mirror + yoff + xoff, bw * bpp) =3D=3D 0) { ...