Re: [Qemu-devel] [PATCH] linux-user: fill target sigcontext struct accordingly

2017-02-13 Thread joserz
Up On Wed, Feb 01, 2017 at 09:43:57PM +0100, Laurent Vivier wrote: > Le 31/01/2017 à 23:05, Jose Ricardo Ziviani a écrit : > > A segfault is noticed when an emulated program uses any of ucontext > > regs fields. Risu detected this issue in the following operation when > > handling a signal: > >

Re: [Qemu-devel] [PATCH] linux-user: fill target sigcontext struct accordingly

2017-02-01 Thread Laurent Vivier
Le 31/01/2017 à 23:05, Jose Ricardo Ziviani a écrit : > A segfault is noticed when an emulated program uses any of ucontext > regs fields. Risu detected this issue in the following operation when > handling a signal: > ucontext_t *uc = (ucontext_t*)uc; > uc->uc_mcontext.regs->nip += 4; > >

[Qemu-devel] [PATCH] linux-user: fill target sigcontext struct accordingly

2017-01-31 Thread Jose Ricardo Ziviani
A segfault is noticed when an emulated program uses any of ucontext regs fields. Risu detected this issue in the following operation when handling a signal: ucontext_t *uc = (ucontext_t*)uc; uc->uc_mcontext.regs->nip += 4; but this works fine: uc->uc_mcontext.gp_regs[PT_NIP] += 4; This