Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/mips/mips fix a register copy in compat_16_sys___si...



details:   https://anonhg.NetBSD.org/src/rev/0f05bfa60cee
branches:  trunk
changeset: 791847:0f05bfa60cee
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Dec 06 13:52:05 2013 +0000

description:
fix a register copy in compat_16_sys___sigreturn14() that GCC 4.8
picked up (would have read uninitialised, and possibly unmapped data,
but i doubt many people are running netbsd 1.6 mips apps on mips64
hosts yet.)

diffstat:

 sys/arch/mips/mips/compat_16_machdep.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9b8482b316c1 -r 0f05bfa60cee sys/arch/mips/mips/compat_16_machdep.c
--- a/sys/arch/mips/mips/compat_16_machdep.c    Fri Dec 06 13:33:15 2013 +0000
+++ b/sys/arch/mips/mips/compat_16_machdep.c    Fri Dec 06 13:52:05 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: compat_16_machdep.c,v 1.20 2011/05/02 00:29:54 rmind Exp $     */
+/*     $NetBSD: compat_16_machdep.c,v 1.21 2013/12/06 13:52:05 mrg Exp $       */
 
 /*-
  * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -45,7 +45,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
        
-__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.20 2011/05/02 00:29:54 rmind Exp $"); 
+__KERNEL_RCSID(0, "$NetBSD: compat_16_machdep.c,v 1.21 2013/12/06 13:52:05 mrg Exp $"); 
 
 #ifdef _KERNEL_OPT
 #include "opt_cputype.h"
@@ -270,7 +270,7 @@
        memcpy(&tf->tf_regs[1], &scp->sc_regs[1],
            sizeof(scp->sc_regs) - sizeof(scp->sc_regs[0]));
 #else
-       for (size_t i = 1; i < __arraycount(tf->tf_regs); i++)
+       for (size_t i = 1; i < __arraycount(ksc.sc_regs); i++)
                tf->tf_regs[i] = ksc.sc_regs[i];
 #endif
 #if !defined(NOFPU)



Home | Main Index | Thread Index | Old Index