bootstrap fix (was: Re: regression fixes)

Pavel Holejsovsky pavel.holejsovsky at upek.com
Fri Sep 10 09:24:54 PDT 2004


Hi,

Pavel Holejsovsky wrote:
> OK, the final problem for me is that I'm not able to bootstrap... 
> Bootstrapped vm always crashes, when compiled with debug information, I 
> can see:
> 
> assertion "PSObjectHeap_includes_(oh, (unsigned long int) 
> ObjectPointer_pointer(*root))" failed: file "test01.c", line 714

No wonder that it was only me.  I was generating VMs with different 
names than vm.{ch}, but src/mobius/platform/boot.c always included vm.h. 
  Unfortunately, there was always some old vm.h lying around, and it's 
layout of ObjectHeap structure was not compatible with the real one in 
freshly generated test01.h --> bizarre crashes.  Attached patch should 
avoid this situation and build boot.c which always includes correct vm.h 
depending on your VM= variable setting.

have a nice weekend, guys
Pavel

-------------- next part --------------
Index: Makefile
===================================================================
RCS file: /var/lib/cvs/slate/slate/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile	16 Aug 2004 18:43:18 -0000	1.11
+++ Makefile	10 Sep 2004 16:16:43 -0000
@@ -20,7 +20,7 @@
 all: $(VM)
 
 clean:
-	-rm -f $(OBJS) $(VM)
+	-rm -f $(OBJS) $(VM) slatevm.h
 
 $(VM): $(OBJS)
 	$(CC) $(CFLAGS) -o $(VM) $(OBJS) $(LIBS)
@@ -35,3 +35,8 @@
 	-rm $(exec_prefix)/slate
 	-rm $(lispdir)/slate-mode.el
 	-rm $(includedir)/slatevm.h
+
+$(OBJS) : slatevm.h
+
+slatevm.h : $(VM).h
+	ln -s $< $@

Index: src/mobius/vm/platform/boot.c
===================================================================
RCS file: /var/lib/cvs/slate/slate/src/mobius/vm/platform/boot.c,v
retrieving revision 1.1
diff -u -r1.1 boot.c
--- src/mobius/vm/platform/boot.c	2 Aug 2004 05:00:38 -0000	1.1
+++ src/mobius/vm/platform/boot.c	10 Sep 2004 16:17:34 -0000
@@ -10,7 +10,7 @@
     exit (EXIT_FAILURE);
 }
 
-#include "vm.h"
+#include "slatevm.h"
 
 void
 growMemoryBy (struct ObjectHeap * heap, unsigned long int delta)


More information about the Slate mailing list