This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]