From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lr7hP-0002V0-AH for qemu-devel@nongnu.org; Tue, 07 Apr 2009 05:34:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lr7hK-0002SP-IV for qemu-devel@nongnu.org; Tue, 07 Apr 2009 05:34:30 -0400 Received: from [199.232.76.173] (port=33294 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lr7hK-0002SC-8q for qemu-devel@nongnu.org; Tue, 07 Apr 2009 05:34:26 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50013) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lr7hJ-0003Ug-SQ for qemu-devel@nongnu.org; Tue, 07 Apr 2009 05:34:26 -0400 From: Avi Kivity Date: Tue, 7 Apr 2009 12:33:52 +0300 Message-Id: <1239096832-25757-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH] Fix crash on resolution change -> screen dump -> vga redraw Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org The vga screen dump function updates last_width and last_height, but does not change the DisplaySurface that these variables describe. A consequent vga_draw_graphic() will therefore fail to resize the surface and crash. Fix by invalidating the display state after a screen dump, forcing vga_draw_graphic() to reallocate the DisplaySurface. Signed-off-by: Avi Kivity --- hw/vga.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index b1e4373..4d1049b 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -2678,4 +2678,5 @@ static void vga_screen_dump(void *opaque, const char *filename) vga_screen_dump_graphic(s, filename); else vga_screen_dump_text(s, filename); + vga_invalidate_display(s); } -- 1.6.0.6