[Openmcl-cvs-notifications] r11748 - /trunk/source/lisp-kernel/x86-gc.c
gb at clozure.com
gb at clozure.com
Tue Feb 17 10:09:47 EST 2009
Author: gb
Date: Tue Feb 17 10:09:46 2009
New Revision: 11748
Log:
In compact_dynamic_heap(), don't call update_self_references() if
'skip' (non-node words in the function) is 0.
Be paranoid about this in update_self_references(), too, but it's
more important to check in the caller, since update_self_references()
operates on the destination vector after the non-node words have been
copied. (If 0 non-nodes are copied, the destination vector will have
a random value for the non-node word count and random offsets in the
self-reference table.)
? (ccl::allocate-typed-vector :function 9)
#<a funny-looking function, at this point>
? (process-run-function "at the wrong time" (lambda () (gc)))
Modified:
trunk/source/lisp-kernel/x86-gc.c
Modified: trunk/source/lisp-kernel/x86-gc.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lisp-kernel/x86-gc.c (original)
+++ trunk/source/lisp-kernel/x86-gc.c Tue Feb 17 10:09:46 2009
@@ -1857,10 +1857,12 @@
natural i, offset;
=
i =3D ((unsigned short *)node)[2];
- offset =3D node[--i];
- while (offset) {
- *(LispObj *)(p + offset) =3D fn;
+ if (i) {
offset =3D node[--i];
+ while (offset) {
+ *(LispObj *)(p + offset) =3D fn;
+ offset =3D node[--i];
+ }
} =
}
#endif
@@ -1933,13 +1935,15 @@
int skip =3D *((int *)src);
#endif
*dest++ =3D node;
- elements -=3D skip;
- while(skip--) {
- *dest++ =3D *src++;
- }
+ if (skip) {
+ elements -=3D skip;
+ while(skip--) {
+ *dest++ =3D *src++;
+ }
#ifdef X8632
- update_self_references(f);
-#endif
+ update_self_references(f);
+#endif
+ }
while(elements--) {
*dest++ =3D node_forwarding_address(*src++);
}
More information about the Openmcl-cvs-notifications
mailing list