From patchwork Thu Mar 15 08:52:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [2/2] linux-user: Bug on a zero comparation with sas_ss_flags Date: Wed, 14 Mar 2012 22:52:08 -0000 From: Alex Barcelo X-Patchwork-Id: 146856 Message-Id: <1331801528-4646-3-git-send-email-abarcelo@ac.upc.edu> To: Cc: Riku Voipio , Alex Barcelo All sas_ss_flags' 0 check is the same across every architecture. But in PPC there was a bug and it was checked the other way round. It seems a typo and is not architecture dependant, is a POSIX standard and the QEMU way of checking it. Now the signal.c and its sas_ss_flags check should be coherent and correct across archs. Signed-off-by: Alex Barcelo --- linux-user/signal.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/signal.c b/linux-user/signal.c index d1a2671..d159ada 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -4122,7 +4122,7 @@ static target_ulong get_sigframe(struct target_sigaction *ka, oldsp = env->gpr[1]; if ((ka->sa_flags & TARGET_SA_ONSTACK) && - (sas_ss_flags(oldsp))) { + (sas_ss_flags(oldsp) == 0)) { oldsp = (target_sigaltstack_used.ss_sp + target_sigaltstack_used.ss_size); }