Raymond Toy pushed to branch rtoy-mmap-anon-control-and-binding-stacks at cmucl / cmucl

Commits:

4 changed files:

Changes:

  • src/lisp/backtrace.c
    --- a/src/lisp/backtrace.c
    +++ b/src/lisp/backtrace.c
    @@ -252,7 +252,7 @@ backtrace(int nframes)
     static int
     stack_pointer_p(unsigned long p)
     {
    -    return (p < CONTROL_STACK_START + control_stack_size
    +    return ((void *)p < (void *)control_stack + control_stack_size
     	    && p > (unsigned long) &p && (p & 3) == 0);
     }
     
    

  • src/lisp/solaris-os.c
    --- a/src/lisp/solaris-os.c
    +++ b/src/lisp/solaris-os.c
    @@ -199,8 +199,8 @@ boolean valid_addr(os_vm_address_t addr)
     #ifndef GENCGC
     	    || in_range_p(addr, DYNAMIC_1_SPACE_START, dynamic_space_size)
     #endif
    -	    || in_range_p(addr, CONTROL_STACK_START, control_stack_size)
    -	    || in_range_p(addr, BINDING_STACK_START, binding_stack_size));
    +	    || in_range_p(addr, control_stack, control_stack_size)
    +	    || in_range_p(addr, binding_stack, binding_stack_size));
     }
     
     /* ---------------------------------------------------------------- */
    @@ -412,8 +412,7 @@ os_vm_address_t round_up_sparse_size(os_vm_address_t addr)
      * of the dynamic space can be controlled from the command line.
      */
     static os_vm_address_t spaces[] = {
    -    READ_ONLY_SPACE_START, STATIC_SPACE_START,
    -    BINDING_STACK_START, CONTROL_STACK_START
    +    READ_ONLY_SPACE_START, STATIC_SPACE_START
     };
     
     /*
    

  • src/lisp/validate.c
    --- a/src/lisp/validate.c
    +++ b/src/lisp/validate.c
    @@ -116,14 +116,14 @@ validate_stacks()
     {
         /* Control Stack */
         /* Map the conrol stack wherever we have space */
    -    control_stack = os_validate(NULL, control_stack_size);
    +  control_stack = (lispobj*) os_validate(NULL, control_stack_size);
     
     #if (defined(i386) || defined(__x86_64))
         control_stack_end = (void*)control_stack + control_stack_size;
     #endif
     
         /* Binding Stack */
    -    binding_stack = os_validate(NULL, binding_stack_size);
    +    binding_stack = (lispobj*) os_validate(NULL, binding_stack_size);
     
     #ifdef sparc
         make_stack_holes();
    

  • src/lisp/validate.h
    --- a/src/lisp/validate.h
    +++ b/src/lisp/validate.h
    @@ -37,5 +37,6 @@
     #endif
     
     extern void validate(void);
    +extern void validate_stacks(void);
     
     #endif /* _VALIDATE_H_ */