How is the stack expanded in this case? I'm looking at kernel sources (for mips) do_page_fault(), and the code is relying on VM_GROWDOWN.
On Thu, Feb 18, 2010 at 9:44 PM, Khem Raj <[email protected]> wrote: > On Thu, Feb 18, 2010 at 12:05 PM, Ine Ya <[email protected]> wrote: >> The code, which is creating stack (pthread_allocate_stack) in >> linuxthreads.old/manager.c looks like: >> >> if (mmap((caddr_t)((char *)(new_thread + 1) - INITIAL_STACK_SIZE), >> INITIAL_STACK_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, >> MAP_PRIVATE | MAP_ANONYMOUS | MAP_FIXED | MAP_GROWSDOWN, >> >> however in linuxthreads/manager.c MAP_GROWSDOWN is missing in case of >> _STACK_GROWS_DOWN >> map_addr = mmap(new_thread, stacksize + guardsize, >> PROT_READ | PROT_WRITE | PROT_EXEC, >> MAP_FIXED | MAP_PRIVATE | MAP_ANONYMOUS, -1 >> >> Is this deliberate? > > yes. Also see calculation of new_thread_bottom is changed too. > >> _______________________________________________ >> uClibc mailing list >> [email protected] >> http://lists.busybox.net/mailman/listinfo/uclibc >> > _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
