public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/6976] New: allocated thread stack size can be less than requested stack size
@ 2008-10-24  2:01 mtk dot manpages at gmail dot com
  2008-10-24  2:02 ` [Bug nptl/6976] " mtk dot manpages at gmail dot com
  0 siblings, 1 reply; 4+ messages in thread
From: mtk dot manpages at gmail dot com @ 2008-10-24  2:01 UTC (permalink / raw)
  To: glibc-bugs

For pthread_attr_setstacksize(), POSIX.1-2001 says:

"The stacksize attribute shall define the minimum stack size (in bytes)
allocated for the created threads stack."

However, under NPTL, the allocated stack (as reported by pthread_getattr_np())
can be up to [STACK_MIN - 1] (15 on x86-32) bytes less than was requested.  

The problem line looks to be the following line in nptl/allocatestak.c:

      size &= ~__static_tls_align_m1;

which should probably be something like:

      size = (size + __static_tls_align_m1 + 1) & ~__static_tls_align_m1;

-- 
           Summary: allocated thread stack size can be less than requested
                    stack size
           Product: glibc
           Version: 2.8
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nptl
        AssignedTo: drepper at redhat dot com
        ReportedBy: mtk dot manpages at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com


http://sourceware.org/bugzilla/show_bug.cgi?id=6976

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 4+ messages in thread
[parent not found: <bug-6976-131@http.sourceware.org/bugzilla/>]

end of thread, other threads:[~2014-07-02  6:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24  2:01 [Bug nptl/6976] New: allocated thread stack size can be less than requested stack size mtk dot manpages at gmail dot com
2008-10-24  2:02 ` [Bug nptl/6976] " mtk dot manpages at gmail dot com
     [not found] <bug-6976-131@http.sourceware.org/bugzilla/>
2012-05-23 17:08 ` siddhesh at redhat dot com
2014-07-02  6:06 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).