1
0
mirror of https://github.com/simh/simh.git synced 2026-04-27 04:26:41 +00:00

H316, I7094, NOVA, PDP1, PDP10, PDP8, SDS: Coverity singleton errors

Most history routines defined a local sim_eval of the proper length, but the
erroneous ones were fixed length machines that defined an integer variable
instead of an integer array of length 1. The VAX used the global sim_eval.
The changes follow the VAX practice.
This commit is contained in:
Bob Supnik
2017-09-07 09:52:00 -07:00
committed by Mark Pizzolato
parent f51b621f62
commit 3f8533d957
7 changed files with 33 additions and 26 deletions

View File

@@ -25,6 +25,7 @@
cpu KS10 central processor
07-Sep-17 RMS Fixed sim_eval declaration in history routine (COVERITY)
14-Jan-17 RMS Fixed bugs in 1-proceed
09-Feb-16 RMS Fixed nested indirects and executes (Tim Litt)
25-Mar-12 RMS Added missing parameters to prototypes (Mark Pizzolato)
@@ -2478,7 +2479,7 @@ t_stat cpu_show_hist (FILE *st, UNIT *uptr, int32 val, void *desc)
int32 k, di, lnt;
char *cptr = (char *) desc;
t_stat r;
t_value sim_eval;
extern t_value *sim_eval;
InstHistory *h;
if (hst_lnt == 0) /* enabled? */
@@ -2500,8 +2501,8 @@ for (k = 0; k < lnt; k++) { /* print specified */
fprint_val (st, h->ac, 8, 36, PV_RZRO);
fputs (" ", st);
fprintf (st, "%06o ", h->ea);
sim_eval = h->ir;
if ((fprint_sym (st, h->pc & AMASK, &sim_eval, &cpu_unit, SWMASK ('M'))) > 0) {
sim_eval[0] = h->ir;
if ((fprint_sym (st, h->pc & AMASK, sim_eval, &cpu_unit, SWMASK ('M'))) > 0) {
fputs ("(undefined) ", st);
fprint_val (st, h->ir, 8, 36, PV_RZRO);
}