diff options
Diffstat (limited to 'linuxthreads/attr.c')
-rw-r--r-- | linuxthreads/attr.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index 56f6cba092..80f5249d36 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -455,12 +455,17 @@ int pthread_getattr_np (pthread_t thread, pthread_attr_t *attr) { /* Found the entry. Now we have the info we need. */ attr->__stacksize = rl.rlim_cur; +#ifdef _STACK_GROWS_UP + /* Don't check to enforce a limit on the __stacksize */ + attr->__stackaddr = (void *) from; +#else attr->__stackaddr = (void *) to; /* The limit might be too high. This is a bogus situation but try to avoid making it worse. */ if ((size_t) attr->__stacksize > (size_t) attr->__stackaddr) attr->__stacksize = (size_t) attr->__stackaddr; +#endif /* We succeed and no need to look further. */ ret = 0; |