From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24581 invoked by alias); 24 Oct 2008 02:01:00 -0000 Received: (qmail 12986 invoked by uid 48); 24 Oct 2008 01:59:44 -0000 Date: Fri, 24 Oct 2008 02:01:00 -0000 From: "mtk dot manpages at gmail dot com" To: glibc-bugs@sources.redhat.com Message-ID: <20081024015943.6976.mtk.manpages@gmail.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nptl/6976] New: allocated thread stack size can be less than requested stack size X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2008-10/txt/msg00058.txt.bz2 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.