mirror of
https://github.com/simh/simh.git
synced 2026-04-27 20:38:04 +00:00
TAPE: Fix potential crash in library unit tests
Improper declaration of state variables referenced in setjmp/longjmp.
This commit is contained in:
committed by
Mark Pizzolato
parent
272bbd4551
commit
4041894b67
8
scp.h
8
scp.h
@@ -456,13 +456,13 @@ extern const char *sim_vm_step_unit; /* Simulator can change
|
||||
These defines help implement consistent unit test functionality */
|
||||
|
||||
#define SIM_TEST_INIT \
|
||||
int test_stat; \
|
||||
const char *sim_test; \
|
||||
volatile int test_stat; \
|
||||
const char *volatile sim_test; \
|
||||
jmp_buf sim_test_env; \
|
||||
if ((test_stat = setjmp (sim_test_env))) { \
|
||||
sim_printf ("Error: %d - '%s' processing: %s\n", \
|
||||
test_stat, sim_error_text(test_stat), \
|
||||
sim_test); \
|
||||
SCPE_BARE_STATUS(test_stat), \
|
||||
sim_error_text(test_stat), sim_test); \
|
||||
return test_stat; \
|
||||
}
|
||||
#define SIM_TEST(_stat) \
|
||||
|
||||
Reference in New Issue
Block a user