SIGSEGV in static_code_gen_buffer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
Trying to run 'ls' (or, anything else as far as I can tell) from a SunOS 5.8 box under RHEL 6.4 linux, I get a segfault. I've tried qemu-1.5.3, qemu-1.6.0, and I fetched git://git.
wcolburn@
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-60.el6_4.1)
Copyright (C) 2010 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 "x86_64-
For bug reporting instructions, please see:
<http://
Reading symbols from /home/anotheruv
(gdb) run ../sparc/ls
Starting program: /home/anotheruv
[Thread debugging using libthread_db enabled]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff8259116 in static_
Missing separate debuginfos, use: debuginfo-install glib2-2.
(gdb) where
#0 0x00007ffff8259116 in static_
#1 0x00007ffff7f570cd in cpu_tb_exec (cpu=0x7ffffa2b
0x7ffff82590d0 "A\213n \205í\017\205Í")
at /home/anotheruv
#2 0x00007ffff7f57b2d in cpu_sparc_exec (env=0x7ffffa2b
at /home/anotheruv
#3 0x00007ffff7f77f36 in cpu_loop (env=0x7ffffa2b
at /home/anotheruv
#4 0x00007ffff7f798ff in main (argc=2, argv=0x7fffffff
0x7fffffffdfe0) at /home/anotheruv
(gdb)
SIGSEGVs from qemu-linux-user are expected -- this is how we track self-modifying code in the guest binary. We catch the SIGSEGV and handle it appropriately. In particular, SPARC binaries do this a lot because their dynamic-linking mechanism involves self-modifying code.
If you don't run the program under a debugger (or if you tell gdb to pass SIGSEGV through to the target rather than stopping), what does it do?