/[cmucl]/src/lisp/gencgc.c
ViewVC logotype

Diff of /src/lisp/gencgc.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.7 by dtc, Thu Dec 25 09:33:48 1997 UTC revision 1.8 by dtc, Wed Dec 31 18:07:42 1997 UTC
# Line 5  Line 5 
5   * codes from Carnegie Mellon University. This code has been placed in   * codes from Carnegie Mellon University. This code has been placed in
6   * the public domain, and is provided 'as is'.   * the public domain, and is provided 'as is'.
7   *   *
8   * Douglas Crosher, 1996, 1997.   * Douglas Crosher, 1996, 1997, 1998.
9   *   *
10   * $Header$   * $Header$
11   * */   * */
# Line 4310  scavenge_thread_stacks(void) Line 4310  scavenge_thread_stacks(void)
4310        lispobj stack_obj = vector->data[i];        lispobj stack_obj = vector->data[i];
4311        if (LowtagOf(stack_obj) == type_OtherPointer) {        if (LowtagOf(stack_obj) == type_OtherPointer) {
4312          struct vector *stack = (struct vector *) PTR(stack_obj);          struct vector *stack = (struct vector *) PTR(stack_obj);
4313          int length, j;          int vector_length;
4314          if (TypeOf(stack->header) != type_SimpleArrayUnsignedByte32)          if (TypeOf(stack->header) != type_SimpleArrayUnsignedByte32)
4315            return;            return;
4316          length = fixnum_value(stack->length);          vector_length = fixnum_value(stack->length);
4317          if (gencgc_verbose > 1)          if ((gencgc_verbose > 1) && (vector_length <= 0))
4318            fprintf(stderr,"Scavenging control stack %d of length %d words\n",            fprintf(stderr,"*W control stack vector length %d\n", vector_length);
4319                    i,length);          if (vector_length > 0) {
4320          for (j = 0; j < length; j++)            unsigned int stack_pointer = stack->data[0];
4321            preserve_pointer((void *)stack->data[j]);            if ((stack_pointer < control_stack) ||
4322                  (stack_pointer > control_stack_end))
4323                fprintf(stderr,"*E Invalid stack pointer %x\n", stack_pointer);
4324              if ((stack_pointer > control_stack) &&
4325                  (stack_pointer < control_stack_end)) {
4326                unsigned int length = ((int)control_stack_end - stack_pointer) / 4;
4327                int j;
4328                if (length >= vector_length)
4329                  fprintf(stderr,"*E Invalid stack size %d >= vector length %d\n",
4330                          length, vector_length);
4331                if (gencgc_verbose > 1)
4332                  fprintf(stderr,"Scavenging %d words of control stack %d of length %d words.\n",
4333                          length,i,vector_length);
4334                for (j = 0; j < length; j++)
4335                  preserve_pointer((void *)stack->data[1+j]);
4336              }
4337            }
4338        }        }
4339      }      }
4340    }    }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.5