From 4bf195ee71b00276aee9d970e217a7ba08a904d4 Mon Sep 17 00:00:00 2001 From: Nick Briggs Date: Sat, 19 Sep 2020 22:05:06 -0700 Subject: [PATCH] Some parts of the system still depend on the Lisp memory being initialized to zero. Ensure that that happens. modified: src/ldsout.c --- src/ldsout.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ldsout.c b/src/ldsout.c index 943df50..e36fe86 100644 --- a/src/ldsout.c +++ b/src/ldsout.c @@ -206,11 +206,12 @@ int sysout_loader(char * sysout_file_name, int sys_size) /* allocate Virtual Memory Space */ lispworld_scratch = valloc(sys_size * MBYTE); - if (lispworld_scratch == NULL) { fprintf(stderr, "sysout_loader: can't allocate Lisp %dMBytes VM \n", sys_size); exit(-1); } + /* Sadly, parts of the system depend on memory being initialized to zero */ + memset(lispworld_scratch, 0, sys_size * MBYTE); /* now you can access lispworld */ Lisp_world = (DLword *)lispworld_scratch;