Changeset 11748


Ignore:
Timestamp:
Feb 17, 2009, 3:09:46 PM (10 years ago)
Author:
gb
Message:

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)))

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/x86-gc.c

    r11623 r11748  
    18591859
    18601860  i = ((unsigned short *)node)[2];
    1861   offset = node[--i];
    1862   while (offset) {
    1863     *(LispObj *)(p + offset) = fn;
     1861  if (i) {
    18641862    offset = node[--i];
     1863    while (offset) {
     1864      *(LispObj *)(p + offset) = fn;
     1865      offset = node[--i];
     1866    }
    18651867  }   
    18661868}
     
    19351937#endif
    19361938            *dest++ = node;
    1937             elements -= skip;
    1938             while(skip--) {
    1939               *dest++ = *src++;
    1940             }
     1939            if (skip) {
     1940              elements -= skip;
     1941              while(skip--) {
     1942                *dest++ = *src++;
     1943              }
    19411944#ifdef X8632
    1942             update_self_references(f);
    1943 #endif
     1945              update_self_references(f);
     1946#endif
     1947            }
    19441948            while(elements--) {
    19451949              *dest++ = node_forwarding_address(*src++);
Note: See TracChangeset for help on using the changeset viewer.