amd64: Pass correct address to signal handlers.
authorJordan Gordeev <jgordeev@dir.bg>
Sat, 13 Feb 2010 13:02:22 +0000 (15:02 +0200)
committerSascha Wildner <saw@online.de>
Sun, 21 Mar 2010 08:16:46 +0000 (09:16 +0100)
sys/platform/pc64/x86_64/machdep.c

index 1f7b676..eabe97f 100644 (file)
@@ -460,13 +460,13 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
                 * action(signo, siginfo, ucontext)
                 */
                regs->tf_rsi = (register_t)&sfp->sf_si; /* argument 2 */
-               regs->tf_rcx = (register_t)regs->tf_err; /* argument 4 */
+               regs->tf_rcx = (register_t)regs->tf_addr; /* argument 4 */
                sf.sf_ahu.sf_action = (__siginfohandler_t *)catcher;
 
                /* fill siginfo structure */
                sf.sf_si.si_signo = sig;
                sf.sf_si.si_code = code;
-               sf.sf_si.si_addr = (void *)regs->tf_err;
+               sf.sf_si.si_addr = (void *)regs->tf_addr;
        } else {
                /*
                 * Old FreeBSD-style arguments.
@@ -474,7 +474,7 @@ sendsig(sig_t catcher, int sig, sigset_t *mask, u_long code)
                 * handler (signo, code, [uc], addr)
                 */
                regs->tf_rsi = (register_t)code;        /* argument 2 */
-               regs->tf_rcx = (register_t)regs->tf_err; /* argument 4 */
+               regs->tf_rcx = (register_t)regs->tf_addr; /* argument 4 */
                sf.sf_ahu.sf_handler = catcher;
        }