* [Qemu-devel] [Bug 1416988] [NEW] Wrong signal handling in qemu-aarch64.
@ 2015-02-02 7:58 Maxim Ostapenko
2016-01-12 22:28 ` [Qemu-devel] [Bug 1416988] " pranith
0 siblings, 1 reply; 2+ messages in thread
From: Maxim Ostapenko @ 2015-02-02 7:58 UTC (permalink / raw)
To: qemu-devel
Public bug reported:
Running GCC 5.0 testsuite under qemu-aarch64, I noticed that tests
connected with stack unwinding fail with:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
or run into infinite loop.
Here is one example:
$ /home/max/build/gcc-aarch64/gcc/xgcc -B/home/max/build/gcc-
aarch64/gcc/
/home/max/src/toolchain/gcc/gcc/testsuite/gcc.dg/cleanup-11.c
-fexceptions -fnon-call-exceptions -O2 -lm -o ./cleanup-11.exe
$ qemu-aarch64 -L /home/max/install/aarch64/aarch64-linux/sys-root/ -R 0 -/cleanup-11.exe
qemu: uncaught target signal 11 (Segmentation fault) - core dumped.
Actually, this caused by ABI incompatibility between Linux Kernel
(trunk) and qemu-aarch64. In fact, size of siginfo structure in Linux
and target_siginfo structure in qemu-aarch64 differ:
sizeof (struct target_siginfo) = 136 // QEMU
sizeof (struct siginfo) = 128 // Linux Kernel
This caused by wrong TARGET_SI_PAD_SIZE defined in linux-user/syscall_defs.h:
#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3)
In Kernel respective value is:
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
.............................................
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) // for Aarch64
Trivial fix, changing TARGET_SI_PAD_SIZE to right value, is attached.
** Affects: qemu
Importance: Undecided
Status: New
** Patch added: "Trivial fix."
https://bugs.launchpad.net/bugs/1416988/+attachment/4310279/+files/qemu_siginfo.diff
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1416988
Title:
Wrong signal handling in qemu-aarch64.
Status in QEMU:
New
Bug description:
Running GCC 5.0 testsuite under qemu-aarch64, I noticed that tests
connected with stack unwinding fail with:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
or run into infinite loop.
Here is one example:
$ /home/max/build/gcc-aarch64/gcc/xgcc -B/home/max/build/gcc-
aarch64/gcc/
/home/max/src/toolchain/gcc/gcc/testsuite/gcc.dg/cleanup-11.c
-fexceptions -fnon-call-exceptions -O2 -lm -o ./cleanup-11.exe
$ qemu-aarch64 -L /home/max/install/aarch64/aarch64-linux/sys-root/ -R 0 -/cleanup-11.exe
qemu: uncaught target signal 11 (Segmentation fault) - core dumped.
Actually, this caused by ABI incompatibility between Linux Kernel
(trunk) and qemu-aarch64. In fact, size of siginfo structure in Linux
and target_siginfo structure in qemu-aarch64 differ:
sizeof (struct target_siginfo) = 136 // QEMU
sizeof (struct siginfo) = 128 // Linux Kernel
This caused by wrong TARGET_SI_PAD_SIZE defined in linux-user/syscall_defs.h:
#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3)
In Kernel respective value is:
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
.............................................
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) // for Aarch64
Trivial fix, changing TARGET_SI_PAD_SIZE to right value, is attached.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1416988/+subscriptions
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] [Bug 1416988] Re: Wrong signal handling in qemu-aarch64.
2015-02-02 7:58 [Qemu-devel] [Bug 1416988] [NEW] Wrong signal handling in qemu-aarch64 Maxim Ostapenko
@ 2016-01-12 22:28 ` pranith
0 siblings, 0 replies; 2+ messages in thread
From: pranith @ 2016-01-12 22:28 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: New => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1416988
Title:
Wrong signal handling in qemu-aarch64.
Status in QEMU:
Fix Released
Bug description:
Running GCC 5.0 testsuite under qemu-aarch64, I noticed that tests
connected with stack unwinding fail with:
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
or run into infinite loop.
Here is one example:
$ /home/max/build/gcc-aarch64/gcc/xgcc -B/home/max/build/gcc-
aarch64/gcc/
/home/max/src/toolchain/gcc/gcc/testsuite/gcc.dg/cleanup-11.c
-fexceptions -fnon-call-exceptions -O2 -lm -o ./cleanup-11.exe
$ qemu-aarch64 -L /home/max/install/aarch64/aarch64-linux/sys-root/ -R 0 -/cleanup-11.exe
qemu: uncaught target signal 11 (Segmentation fault) - core dumped.
Actually, this caused by ABI incompatibility between Linux Kernel
(trunk) and qemu-aarch64. In fact, size of siginfo structure in Linux
and target_siginfo structure in qemu-aarch64 differ:
sizeof (struct target_siginfo) = 136 // QEMU
sizeof (struct siginfo) = 128 // Linux Kernel
This caused by wrong TARGET_SI_PAD_SIZE defined in linux-user/syscall_defs.h:
#define TARGET_SI_PAD_SIZE ((TARGET_SI_MAX_SIZE/sizeof(int)) - 3)
In Kernel respective value is:
#define SI_PAD_SIZE ((SI_MAX_SIZE - __ARCH_SI_PREAMBLE_SIZE) / sizeof(int))
.............................................
#define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) // for Aarch64
Trivial fix, changing TARGET_SI_PAD_SIZE to right value, is attached.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1416988/+subscriptions
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-01-12 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 7:58 [Qemu-devel] [Bug 1416988] [NEW] Wrong signal handling in qemu-aarch64 Maxim Ostapenko
2016-01-12 22:28 ` [Qemu-devel] [Bug 1416988] " pranith
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.