Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 make sure 32 bit addresses are trun...
details: https://anonhg.NetBSD.org/src/rev/8531ca2b2fec
branches: trunk
changeset: 503399:8531ca2b2fec
user: mrg <mrg%NetBSD.org@localhost>
date: Mon Feb 05 12:45:38 2001 +0000
description:
make sure 32 bit addresses are truncated properly.
diffstat:
sys/arch/sparc64/sparc64/trap.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r b08d45004cbe -r 8531ca2b2fec sys/arch/sparc64/sparc64/trap.c
--- a/sys/arch/sparc64/sparc64/trap.c Mon Feb 05 12:37:33 2001 +0000
+++ b/sys/arch/sparc64/sparc64/trap.c Mon Feb 05 12:45:38 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.60 2000/12/29 17:07:12 eeh Exp $ */
+/* $NetBSD: trap.c,v 1.61 2001/02/05 12:45:38 mrg Exp $ */
/*
* Copyright (c) 1996
@@ -930,15 +930,16 @@
struct rwindow32 rwstack;
/* 32-bit window */
- for (j=0; j<8; j++) {
+ for (j = 0; j < 8; j++) {
rwstack.rw_local[j] = (int)rw[i].rw_local[j];
rwstack.rw_in[j] = (int)rw[i].rw_in[j];
}
- if (copyout(&rwstack, (caddr_t)(u_long)rwdest, sizeof(rwstack))) {
+ /* Must truncate rwdest */
+ if (copyout(&rwstack, (caddr_t)(u_long)(u_int)rwdest, sizeof(rwstack))) {
#ifdef DEBUG
if (rwindow_debug&RW_ERR)
- printf("rwindow_save: 32-bit pcb copyout to %p failed\n",
- (void *)(long)rwdest);
+ printf("rwindow_save: 32-bit pcb copyout to %p (%p) failed\n",
+ (void *)(u_long)(u_int)rwdest, (void *)(u_long)rwdest);
#endif
return (-1);
}
Home |
Main Index |
Thread Index |
Old Index