Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hpcmips/hpcmips When compiled with DEBUG/DIAGNOSTIC...



details:   https://anonhg.NetBSD.org/src/rev/f601ac25ac82
branches:  trunk
changeset: 823758:f601ac25ac82
user:      skrll <skrll%NetBSD.org@localhost>
date:      Sun May 07 12:22:22 2017 +0000

description:
When compiled with DEBUG/DIAGNOSTIC memset uses the stack so don't ask
it to overwrite it.  64 bytes is enough stack for any memset.

diffstat:

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

diffs (27 lines):

diff -r 892837625dc2 -r f601ac25ac82 sys/arch/hpcmips/hpcmips/machdep.c
--- a/sys/arch/hpcmips/hpcmips/machdep.c        Sun May 07 12:20:50 2017 +0000
+++ b/sys/arch/hpcmips/hpcmips/machdep.c        Sun May 07 12:22:22 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.122 2017/05/07 12:20:50 skrll Exp $      */
+/*     $NetBSD: machdep.c,v 1.123 2017/05/07 12:22:22 skrll Exp $      */
 
 /*-
  * Copyright (c) 1999 Shin Takemura, All rights reserved.
@@ -69,7 +69,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2017/05/07 12:20:50 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.123 2017/05/07 12:22:22 skrll Exp $");
 
 #include "opt_vr41xx.h"
 #include "opt_tx39xx.h"
@@ -427,7 +427,7 @@
                u_int32_t sp;
                __asm volatile("move %0, $29" : "=r"(sp));
                KDASSERT(sp > KERNBASE + 0x400);
-               memset((void *)(KERNBASE + 0x400), 0, sp - (KERNBASE + 0x400));
+               memset((void *)(KERNBASE + 0x400), 0, sp - (KERNBASE + 0x400) - 64);
        }
 
        printf("mem_cluster_cnt = %d\n", mem_cluster_cnt);



Home | Main Index | Thread Index | Old Index