From 0c8b421dcdab9f5003f1e2f336b92e61bfd706ec Mon Sep 17 00:00:00 2001 From: kensmith Date: Tue, 28 Sep 2004 16:36:58 +0000 Subject: 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 --- sys/sparc64/sparc64/rwindow.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys') 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; -- cgit v1.1