Skip to content
Snippets Groups Projects
Commit 26920a29 authored by Jose Ricardo Ziviani's avatar Jose Ricardo Ziviani Committed by Laurent Vivier
Browse files

linux-user: fill target sigcontext struct accordingly


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 patch set regs to a valid location as well as other sigcontext
fields.

Signed-off-by: default avatarJose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Reviewed-by: default avatarLaurent Vivier <laurent@vivier.eu>
Message-Id: <1485900317-3256-1-git-send-email-joserz@linux.vnet.ibm.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 35f2fd04
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment