public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nptl/5476] New: fix stacksize overflow
@ 2007-12-12 9:53 wangf at cn dot fujitsu dot com
2007-12-12 9:55 ` [Bug nptl/5476] " wangf at cn dot fujitsu dot com
2007-12-12 17:52 ` drepper at redhat dot com
0 siblings, 2 replies; 3+ messages in thread
From: wangf at cn dot fujitsu dot com @ 2007-12-12 9:53 UTC (permalink / raw)
To: glibc-bugs
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug nptl/5476] fix stacksize overflow
2007-12-12 9:53 [Bug nptl/5476] New: fix stacksize overflow wangf at cn dot fujitsu dot com
@ 2007-12-12 9:55 ` wangf at cn dot fujitsu dot com
2007-12-12 17:52 ` drepper at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: wangf at cn dot fujitsu dot com @ 2007-12-12 9:55 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From wangf at cn dot fujitsu dot com 2007-12-12 09:55 -------
Created an attachment (id=2133)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=2133&action=view)
patch to fix the bug
--
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug nptl/5476] fix stacksize overflow
2007-12-12 9:53 [Bug nptl/5476] New: fix stacksize overflow wangf at cn dot fujitsu dot com
2007-12-12 9:55 ` [Bug nptl/5476] " wangf at cn dot fujitsu dot com
@ 2007-12-12 17:52 ` drepper at redhat dot com
1 sibling, 0 replies; 3+ messages in thread
From: drepper at redhat dot com @ 2007-12-12 17:52 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2007-12-12 17:51 -------
This is a user bug. I'm not going to add code to prevent the user from shooting
herself/himself in the foot. Maybe sometimes it's useful. There is a clearly
documented minimum stack size. If it is not followed bad things can happen.
So, don't do it.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-12-12 17:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-12 9:53 [Bug nptl/5476] New: fix stacksize overflow wangf at cn dot fujitsu dot com
2007-12-12 9:55 ` [Bug nptl/5476] " wangf at cn dot fujitsu dot com
2007-12-12 17:52 ` drepper 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).