From nox Mon Sep 17 00:00:00 2001 From: Juergen Lock Date: 06 Jul 2014 16:37:00 +0200 Subject: bsd-user: writing to readonly page can cause trap 0xc on FreeBSD too Signed-off-by: Juergen Lock --- a/user-exec.c +++ b/user-exec.c @@ -230,7 +230,12 @@ int cpu_signal_handler(int host_signum, pc = PC_sig(uc); return handle_cpu_signal(pc, (unsigned long)info->si_addr, +#if defined(__FreeBSD__) || defined(__DragonFly__) + (TRAP_sig(uc) == 0xe || + TRAP_sig(uc) == 0xc) ? +#else TRAP_sig(uc) == 0xe ? +#endif (ERROR_sig(uc) >> 1) & 1 : 0, &MASK_sig(uc), puc); }