qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] sigaltstack bug in qemu (testing on qemu-ppc)


From: Peter Maydell
Subject: Re: [Qemu-devel] sigaltstack bug in qemu (testing on qemu-ppc)
Date: Sat, 4 Feb 2012 23:00:13 +0000

On 4 February 2012 14:26, Alex Barcelo <address@hidden> wrote:
> I am barely able to understand this inline function:
>
> static inline int sas_ss_flags(unsigned long sp)
> {
>    return (target_sigaltstack_used.ss_size == 0 ? SS_DISABLE
>            : on_sig_stack(sp) ? SS_ONSTACK : 0);
> }
> (signal.c @97)
>
> ... and it seems wrong to me when used in the following function. I
> have a test program that uses sigaltstack to do some stack
> manipulation. It doesn't work.
>
> The function:
>    ...
>    if ((ka->sa_flags & TARGET_SA_ONSTACK) &&
>        (/* here maybe a "!" */ sas_ss_flags(oldsp))) {
>    ....
> (signal.c, get_sigframe @4121)

This looks like a bug, yes -- the other architectures have the !
(or equivalent code) in their get_sigframe() implementations so
probably ppc is just wrong here.

There are a few other architectures whose get_sigframe doesn't call
sas_ss_flags() at all -- they might also be wrong but I haven't checked.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]