From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H . J . Lu" To: Ulrich Drepper Cc: GNU libc hacker Subject: A guard patch for linuxthreads Date: Sun, 19 Dec 1999 08:45:00 -0000 Message-id: <19991219084545.A17373@lucon.org> References: <19991219082116.A17290@lucon.org> X-SW-Source: 1999-12/msg00082.html On Sun, Dec 19, 1999 at 08:21:16AM -0800, H . J . Lu wrote: > On Sat, Dec 18, 1999 at 11:53:25AM -0800, Ulrich Drepper wrote: > > I'm back for now and checked in the changes I've made over the days. > > Mainly I've taken most of the changes I got and applied them (some of > > them modified, e.g., HJ's thread patch). > > > > Can we also fix linuxthread in 2.1? Also I am not quite sure if we should > put a guard page beyond the stack bottom. Shouldn't we use this or at least > fix the comment? > > I believe this patch is what we want. H.J. --- manager.c Sun Dec 19 07:51:27 1999 +++ /tmp/manager.c Sun Dec 19 08:43:59 1999 @@ -315,8 +315,8 @@ static int pthread_allocate_stack(const else { /* Put a bad page at the bottom of the stack */ - guardaddr = (void *)new_thread_bottom - stacksize; guardsize = attr->__guardsize; + guardaddr = (void *)new_thread_bottom - guardsize; if (mmap ((caddr_t) guardaddr, guardsize, 0, MAP_FIXED, -1, 0) == MAP_FAILED) {