Ignore:
Timestamp:
Sep 6, 2010, 7:37:55 AM (9 years ago)
Author:
gb
Message:

In initial_stack_bottom(), don't assume that stack bounds have
anything to do with the address of the environment strings. (There's
traditionally often a relationship between the address of the bottom
of the initial thread's stack and the environment area, but I don't
know that that relationship's guaranteed to hold in all cases.)

File:
1 edited

Legend:

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

    r14206 r14232  
    830830initial_stack_bottom()
    831831{
    832 #ifndef WINDOWS
    833   extern char **environ;
    834   char *p = *environ;
    835   while (*p) {
    836     p += (1+strlen(p));
    837   }
    838   return (BytePtr)((((natural) p) +4095) & ~4095);
    839 #endif
    840 #ifdef WINDOWS
    841   return (BytePtr)((current_stack_pointer() + 4095) & ~ 4095);
    842 #endif
    843 }
     832  extern void os_get_current_thread_stack_bounds(void **, natural*);
     833  void *stack_bottom;
     834  natural stack_size;
     835 
     836  os_get_current_thread_stack_bounds(&stack_bottom, &stack_size);
     837  return (BytePtr)stack_bottom;
     838}
     839
    844840
    845841
Note: See TracChangeset for help on using the changeset viewer.