Changeset 10364


Ignore:
Timestamp:
Aug 6, 2008, 6:30:21 AM (11 years ago)
Author:
gb
Message:

Long-standing bug in ppc64 version of mark_pc_root: can't decrement
'dnode' each time we skip 2 (32-bit) words, need to calculate dnode
count (for set_n_bits) correctly. (So, set_n_bits() was getting
called with wrong starting bit, wrong bit count. Other than that,
all was fine.)

mark_pc_root() is only called if a previously unmarked code vector
was referenced via a locative (e.g. the program counter pointing
into the code vector). Rare, but surprising that this hasn't been
encountered before.

File:
1 edited

Legend:

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

    r9905 r10364  
    392392      opcode *program_counter;
    393393
    394       for(program_counter=(opcode *)ptr_from_lispobj(xpc & ~4);
    395           dnode < GCndnodes_in_area;
    396           program_counter-=2, --dnode) {
     394      for(program_counter=(opcode *)ptr_from_lispobj(xpc & ~7);
     395          (LispObj)program_counter >= GCarealow;
     396          program_counter-=2) {
    397397        if (*program_counter == PPC64_CODE_VECTOR_PREFIX) {
    398398          headerP = ((LispObj *)program_counter)-1;
    399399          header = *headerP;
    400           set_n_bits(GCmarkbits, dnode, (2+header_element_count(header))>>1);
     400          dnode = gc_area_dnode(headerP);
     401          set_n_bits(GCmarkbits, dnode, (8+(header_element_count(header)<<2)+(dnode_size-1))>>dnode_shift);
    401402          return;
    402403        }
Note: See TracChangeset for help on using the changeset viewer.