Changeset 7673


Ignore:
Timestamp:
Nov 19, 2007, 6:07:21 AM (12 years ago)
Author:
gb
Message:

Try not to lose it when marking partly-initialized function-vectors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lisp-kernel/x86-gc.c

    r7668 r7673  
    373373          Bug(NULL, "Function 0x%lx trashed",n);
    374374        }
     375        if (prefix_nodes == 0) {
     376          return;
     377        }
    375378      }
    376379      base += (1+element_count);
     
    430433/*
    431434  This wants to be in assembler even more than "mark_root" does.
    432   For now, it does link-inversion: hard as that is to express in C,
    433   reliable stack-overflow detection may be even harder ...
     435  It tries to do recursive marking as long as stack space exists,
     436  then reverts to link-inversion.
    434437*/
    435438void
     
    539542
    540543      if (subtag == subtag_function) {
    541         if ((int)base[1] >= nmark) {
     544        natural prefix_nodes = (natural) ((int) deref(base,1));
     545
     546        if (prefix_nodes >= nmark) {
    542547          Bug(NULL,"Bad function at 0x%lx",n);
     548        }
     549        if (prefix_nodes == 0) {
     550          return;
    543551        }
    544552        nmark -= (int)base[1];
     
    623631       word is added to the aligned address of the  boundary word (restoring
    624632       the original 'this' pointer, and we climb.
     633
     634       If the boundary word is 0 or the immediate-word-count is 0, we
     635       climb: the function's being initialized and doesn't have any
     636       embedded lisp pointers yet.
    625637
    626638       Not that bad.
     
    776788        element_count -= 1;
    777789    }
    778 
     790    if (boundary[0] != function_boundary_marker) {
     791      this = (LispObj) boundary;
     792      goto MarkFunctionDone;
     793    }
    779794    this = (LispObj)(base) + (tag_of(this))  + ((element_count+1) << node_shift);
    780795    goto MarkVectorLoop;
Note: See TracChangeset for help on using the changeset viewer.