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
This commit is contained in:
Ken Smith 2004-09-28 16:36:58 +00:00
parent 34be051190
commit fc449eb47a

View File

@ -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;