qemu-system-ppc segfaults with -display sdl
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Hello.
I was trying to debug this segfault:
https:/
I recompiled latest qemu from git (commit 0b18cfb8f1828c9
./configure --target-
after this I tried original line under gdb, it was still segfaulting:
-------
gdb ./ppc-softmmu/
GNU gdb (GDB) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i586-slackware
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://
Find the GDB manual and other documentation resources online at:
<http://
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./ppc-softmmu/
warning: File "/dev/shm/
To enable execution of this file add
line to your configuration file "/home/
To completely disable this security protection add
set auto-load safe-path /
line to your configuration file "/home/
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
(gdb) run -M mac99,via=pmu -L ../queue-
Starting program: /dev/shm/
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread
[New Thread 0xf560cb40 (LWP 8100)]
[New Thread 0xf4c1ab40 (LWP 8101)]
[New Thread 0xec1b7b40 (LWP 8102)]
[New Thread 0xc5821b40 (LWP 8104)]
[Thread 0xf4c1ab40 (LWP 8101) exited]
[New Thread 0xf4c1ab40 (LWP 8119)]
Thread 4 "qemu-system-ppc" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xec1b7b40 (LWP 8102)]
0xf26c2e44 in code_gen_buffer ()
(gdb) bt full
#0 0xffffffff in code_gen_buffer ()
#1 0x56710cf6 in cpu_exec (itb=<optimized out>, cpu=<optimized out>) at /dev/shm/
env = <optimized out>
ret = <optimized out>
last_tb = <optimized out>
tb_exit = <optimized out>
tb_ptr = 0xf26c2cc0 <code_gen_
ret = 0
insns_left = <optimized out>
cflags = <optimized out>
tb = 0x5722fe58
last_tb = <optimized out>
tb_exit = <optimized out>
cc = <optimized out>
__func__ = "cpu_exec"
ret = <optimized out>
sc = <optimized out>
#2 0x56710cf6 in cpu_exec (tb_exit=<synthetic pointer>, last_tb=<synthetic pointer>, tb=<optimized out>, cpu=<optimized out>) at /dev/shm/
ret = 0
insns_left = <optimized out>
cflags = <optimized out>
tb = 0x5722fe58
last_tb = <optimized out>
tb_exit = <optimized out>
cc = <optimized out>
__func__ = "cpu_exec"
ret = <optimized out>
sc = <optimized out>
#3 0x56710cf6 in cpu_exec (cpu=0x573db8f8) at /dev/shm/
cflags = <optimized out>
tb = 0x5722fe58
last_tb = <optimized out>
tb_exit = <optimized out>
cc = <optimized out>
__func__ = "cpu_exec"
ret = <optimized out>
sc = <optimized out>
#4 0x566cfade in tcg_cpu_exec (cpu=0x573db8f8) at /dev/shm/
ret = <optimized out>
#5 0x566d1e6d in qemu_tcg_
r = <optimized out>
cpu = 0x573db8f8
#6 0x56b56fe0 in qemu_thread_start (args=0x57400668) at util/qemu-
arg = 0x573db8f8
r = <optimized out>
#7 0xffffffff in start_thread () at /lib/libpthread
#8 0xffffffff in clone () at /lib/libc.so.6
(gdb) quit
A debugging session is active.
Inferior 1 [process 8096] will be killed.
Quit anyway? (y or n) y
--------------copy end----------
But when I take away -display sdl, or replace it with -display gtk - same line was booting to desktop!
Changing cpu to G3 also allowed boot:
./ppc-softmmu/
This is 32-bit qemu complied with Slackware's gcc 5.5.0.
64-bit qemu works fine.
Works for me with a 32-bit install of fedora 30.
That's using gcc 9.1.1.
Is building with -Og required to reproduce this?
If so, I'm thinking compiler bug...