This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug nptl/5476] New: fix stacksize overflow
- From: "wangf at cn dot fujitsu dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 12 Dec 2007 09:52:49 -0000
- Subject: [Bug nptl/5476] New: fix stacksize overflow
- Reply-to: sourceware-bugzilla at sourceware dot org
I found a bug about the thread stack size overflow.
Here are procedures to reproduce this bug:
------------------------------------------
[root@localhost Temp]# cat test.c
#include <pthread.h>
#include <stdio.h>
int main(void)
{
size_t stacksize;
pthread_attr_t attr;
pthread_attr_init(&attr);
pthread_attr_getstacksize(&attr, &stacksize);
printf("%lu\n", (unsigned long)stacksize);
return 0;
}
----------------------------------------------------
[root@localhost Temp]# gcc -o test test.c -lpthread
[root@localhost Temp]# ulimit -s 1024
[root@localhost Temp]# ulimit -s
1024
[root@localhost Temp]# ./test
1048576
[root@localhost Temp]# ulimit -s $(( 0xffffffff / 1024 ))
[root@localhost Temp]# ulimit -s
4194303
[root@localhost Temp]# ./test
0
--
Summary: fix stacksize overflow
Product: glibc
Version: unspecified
Status: NEW
Severity: normal
Priority: P2
Component: nptl
AssignedTo: drepper at redhat dot com
ReportedBy: wangf at cn dot fujitsu dot com
CC: glibc-bugs at sources dot redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=5476
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.