summaryrefslogtreecommitdiffstats
path: root/linux-user/signal.c
diff options
context:
space:
mode:
authorMike McCormack2011-06-01 08:14:37 +0200
committerRiku Voipio2011-06-20 16:00:18 +0200
commit9a826d7854baf6b90de46fea785d1bfc5d2c22a7 (patch)
treeb72c7089ad35146ec36f42f3e6c66980d951bf4d /linux-user/signal.c
parenthw/9118.c: Implement active-low interrupt support (diff)
downloadqemu-9a826d7854baf6b90de46fea785d1bfc5d2c22a7.tar.gz
qemu-9a826d7854baf6b90de46fea785d1bfc5d2c22a7.tar.xz
qemu-9a826d7854baf6b90de46fea785d1bfc5d2c22a7.zip
Don't translate pointer when in restore_sigcontext
Fixes crash in i386 when user emulation base address is non-zero. 21797 rt_sigreturn(8,1082124603,1,0,1082126048,1082126248)Exit reason and status: signal 11 Signed-off-by: Mike McCormack <mj.mccormack@samsung.com> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'linux-user/signal.c')
-rw-r--r--linux-user/signal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 11b25be7b8..cb7138f1cf 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -981,8 +981,8 @@ restore_sigcontext(CPUX86State *env, struct target_sigcontext *sc, int *peax)
env->regs[R_ECX] = tswapl(sc->ecx);
env->eip = tswapl(sc->eip);
- cpu_x86_load_seg(env, R_CS, lduw(&sc->cs) | 3);
- cpu_x86_load_seg(env, R_SS, lduw(&sc->ss) | 3);
+ cpu_x86_load_seg(env, R_CS, lduw_p(&sc->cs) | 3);
+ cpu_x86_load_seg(env, R_SS, lduw_p(&sc->ss) | 3);
tmpflags = tswapl(sc->eflags);
env->eflags = (env->eflags & ~0x40DD5) | (tmpflags & 0x40DD5);