From: Stefan Hajnoczi <stefanha@gmail.com>
To: perrier vincent <clownix@clownix.net>
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [Qemu-devel] segfault in memcmp
Date: Mon, 8 Jun 2015 10:31:25 +0100 [thread overview]
Message-ID: <20150608093125.GF30104@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <3a37931fe0e17adc26bdaa23e33f0aa8.squirrel@gator4003.hostgator.com>
[-- Attachment #1: Type: text/plain, Size: 986 bytes --]
On Fri, Jun 05, 2015 at 05:19:53PM -0500, perrier vincent wrote:
> Using a very old guest (lenny) with spice and vga=cirrus, I have
> a segfault:
>
> FILE: ui/spice-display.c
> FUNCTION: qemu_spice_create_update
> LINE: if (memcmp(guest + yoff + xoff,
> mirror + yoff + xoff,
> bw * bpp) == 0)
>
> The address of mirror + yoff + xoff is out of boundaries.
>
> I use the following to avoid the crash:
>
> ...
> img_get_stride = pixman_image_get_stride(ssd->mirror);
> img_height = pixman_image_get_height(ssd->mirror);
> img_max = img_height * img_get_stride;
> ...
> if (yoff > img_max)
> {
> if (dirty_top[blk] == -1)
> dirty_top[blk] = y;
> }
> else if (memcmp(guest + yoff + xoff,
> mirror + yoff + xoff,
> bw * bpp) == 0)
> {
> ...
Thanks for the report. I have CCed Gerd Hoffmann who maintains the
graphics subsystem.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2015-06-08 9:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 22:19 [Qemu-devel] segfault in memcmp perrier vincent
2015-06-08 9:31 ` Stefan Hajnoczi [this message]
2015-06-08 11:36 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150608093125.GF30104@stefanha-thinkpad.redhat.com \
--to=stefanha@gmail.com \
--cc=clownix@clownix.net \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).