* [Qemu-devel] [PATCH] ui/spice-display: Avoid segment fault when spice is enabled without qxl
@ 2012-11-08 13:23 Dunrong Huang
2012-11-08 15:15 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Dunrong Huang @ 2012-11-08 13:23 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
(gdb) r -enable-kvm -m 512 -spice port=5900,addr=0.0.0.0,disable-ticketing ArchLinux.img
Starting program: /root/usr/bin/qemu-system-x86_64 -enable-kvm -m 512 -spice port=5900,addr=0.0.0.0,disable-ticketing ArchLinux.img
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffeed93700 (LWP 23838)]
[New Thread 0x7fffee391700 (LWP 23839)]
Program received signal SIGSEGV, Segmentation fault.
0x00005555557df97d in qemu_spice_destroy_primary_surface (ssd=0x55555611ca80,
id=0, async=QXL_SYNC) at ui/spice-display.c:119
119 ssd->worker->destroy_primary_surface(ssd->worker, id);
(gdb) bt
ssd=0x55555611ca80, id=0, async=QXL_SYNC) at ui/spice-display.c:119
at ui/spice-display.c:343
at ui/spice-display.c:397
at ui/spice-display.c:566
dcl=0x555555cdb040) at ./console.h:218
at ui/spice-display.c:585
envp=0x7fffffffda18) at vl.c:3902
(gdb) p ssd->worker
$1 = (QXLWorker *) 0x0
...
...
Before qemu_spice_add_interface() was called, sdpy.worker was
not be initialized yet, in this case, segment fault occurred
while qemu_spice_display_resize() was called.
Signed-off-by: Dunrong Huang <riegamaths@gmail.com>
---
ui/spice-display.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index fb99148..b256caa 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -562,7 +562,9 @@ static void display_update(struct DisplayState *ds, int x, int y, int w, int h)
static void display_resize(struct DisplayState *ds)
{
- qemu_spice_display_resize(&sdpy);
+ if (sdpy.worker) {
+ qemu_spice_display_resize(&sdpy);
+ }
}
static void display_refresh(struct DisplayState *ds)
--
1.8.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] ui/spice-display: Avoid segment fault when spice is enabled without qxl
2012-11-08 13:23 [Qemu-devel] [PATCH] ui/spice-display: Avoid segment fault when spice is enabled without qxl Dunrong Huang
@ 2012-11-08 15:15 ` Gerd Hoffmann
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2012-11-08 15:15 UTC (permalink / raw)
To: Dunrong Huang; +Cc: qemu-devel
> Before qemu_spice_add_interface() was called, sdpy.worker was
> not be initialized yet, in this case, segment fault occurred
> while qemu_spice_display_resize() was called.
Pending spice pull req fixes it in another way, patch is here:
http://patchwork.ozlabs.org/patch/196518/
cheers,
Gerd
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-08 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08 13:23 [Qemu-devel] [PATCH] ui/spice-display: Avoid segment fault when spice is enabled without qxl Dunrong Huang
2012-11-08 15:15 ` Gerd Hoffmann
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).