qemu-user -g xxx -E LD_PROFILE=xxx segfault
Bug #1773743 reported by
mou
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Here is two simple steps to reproduce the bug:
$ qemu-x86_64 -E LD_PROFILE=
(libc.so and /bin/ls might change on your system, in this case we just need a binary with a profilable needed library)
In a other window launch:
$ gdb
(gdb) target remote :12345
(gdb) c
At this point qemu will segfault.
It seems this problem is appends when sigprof passed to gdb.
One way I have found to bypass this:
patch gdbstub.c gdb_handlesig and ignore sig if
sig == TARGET_SIGPROF
(which means now I can't catch sigprof on gdb anymore)
To post a comment you must log in.
We were mis-parsing the 'vCont' packet in the gdb protocol, so when gdb told us "send a SIGPROF (0x1b)" we skipped the first digit in the hex signal number and interpreted it as "send an 0xb", which happens to be SIGSEGV.
Should be fixed by this:
https://<email address hidden>/