This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: question re: questions
- From: Thomas Vander Stichele <thomas at urgent dot rug dot ac dot be>
- To: "H. J. Lu" <hjl at lucon dot org>
- Cc: Wolfram Gloger <Wolfram dot Gloger at dent dot med dot uni-muenchen dot de>, <libc-alpha at sources dot redhat dot com>
- Date: Fri, 5 Jul 2002 20:07:00 +0200 (CEST)
- Subject: Re: question re: questions
Hi,
> There are 2 problems with the testcae. First of all, the testcase is
> bogus. If it doesn't check all pthread function return value. If
> you do, you will find pthread_attr_setstack () returns EINVAL. The
> problems are malloc may not return the proper aligned memory for
> pthread stack. Also you can't add STACKSIZE to stack memory. See
>
> http://www.opengroup.org/onlinepubs/007904975/functions/pthread_attr_getstack.html
Thanks, I was figuring that was a problem. The code I'm actually trying
to debug (I reworked and reposted that testcase because it seemed similar
to my problem with glibc, and I figured I had better first understand the
code better before trying to attack my bigger problem), uses
posix_memalign to get a good stack space.
> The second problem is the testcase reuses the stack memory. It seems
> to really confuse the glibc. I will see if I can create a different
> testcase.
Do you mean, that different threads are trying to use the same piece of
stack memory ? I will look over it some more now that you have provided
some help.
Thanks very much !
Thomas
--
The Dave/Dina Project : future TV today ! - http://davedina.apestaart.org/
<-*- -*->
I know everybody here wants you
I know everybody here thinks he needs you
And I'll be waiting right here just to show you
how our love will blow it all away
<-*- thomas@apestaart.org -*->
URGent, the best radio on the Internet - 24/7 ! - http://urgent.rug.ac.be/