summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authorkensmith <kensmith@FreeBSD.org>2004-09-28 16:36:58 +0000
committerkensmith <kensmith@FreeBSD.org>2004-09-28 16:36:58 +0000
commit0c8b421dcdab9f5003f1e2f336b92e61bfd706ec (patch)
tree1ed0d3bc30fe13bfe0c7066eea46c7e66f441251 /sys/sparc64
parent504d9a68b311a947544b1c2684b9730c2a9f4ee6 (diff)
downloadFreeBSD-src-0c8b421dcdab9f5003f1e2f336b92e61bfd706ec.zip
FreeBSD-src-0c8b421dcdab9f5003f1e2f336b92e61bfd706ec.tar.gz
Add an assertion that the pcb_nsaved field of the pcb be less than
MAXWIN to the register window manipulation functions - rwindow_load() calls rwindow_save() so this one addition should take care of both. This should help find places that pcb_nsaved doesn't get initialized properly. Suggested by: jake
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/sparc64/rwindow.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sparc64/sparc64/rwindow.c b/sys/sparc64/sparc64/rwindow.c
index 675379e..dc877d4 100644
--- a/sys/sparc64/sparc64/rwindow.c
+++ b/sys/sparc64/sparc64/rwindow.c
@@ -84,6 +84,8 @@ rwindow_save(struct thread *td)
td->td_proc->p_comm, pcb->pcb_nsaved);
flushw();
+ KASSERT(pcb->pcb_nsaved < MAXWIN,
+ ("rwindow_save: pcb_nsaved > MAXWIN"));
if ((i = pcb->pcb_nsaved) == 0)
return (0);
ausp = pcb->pcb_rwsp;
OpenPOWER on IntegriCloud