Re: Too low PTHREAD_STACK_MIN value?

2016-01-23 Thread David Chisnall
On 23 Jan 2016, at 08:58, Maxim Sobolev wrote: > > For what it's worth, I agree with David. This looks like definite misuse of > the constant. If app X requires min size of stack of Y, it's fullish of it if > to expect our PTHREAD_STACK_MIN somehow accommodate that. It should be really > using

Re: Too low PTHREAD_STACK_MIN value?

2016-01-23 Thread Maxim Sobolev
For what it's worth, I agree with David. This looks like definite misuse of the constant. If app X requires min size of stack of Y, it's fullish of it if to expect our PTHREAD_STACK_MIN somehow accommodate that. It should be really using MAX(PTHREAD_STACK_MIN, Y) to set its stack instead. Should be

Re: Too low PTHREAD_STACK_MIN value?

2016-01-22 Thread David Chisnall
On 21 Jan 2016, at 16:02, Ed Maste wrote: > > I found that lang/polyml uses PTHREAD_STACK_MIN for a trivial signal > handler thread it creates[1]. They found it was too small and > implemented a 4K minimum bound to fix polyml on FreeBSD[2]. Even if > this isn't really the intended use of PTHREAD_

Re: Too low PTHREAD_STACK_MIN value?

2016-01-21 Thread Ed Maste
On 11 March 2014 at 20:38, David Chisnall wrote: > On 12 Mar 2014, at 02:07, Roger Pau Monné wrote: > >> I've found out that the value PTHREAD_STACK_MIN is currently set (2048 >> bytes) seems to be way too low > > This looks like an error in your code. The spec says: > >> PTHREAD_STACK_MIN >> Mi

Re: Too low PTHREAD_STACK_MIN value?

2014-03-11 Thread David Chisnall
On 12 Mar 2014, at 02:07, Roger Pau Monné wrote: > I've found out that the value PTHREAD_STACK_MIN is currently set (2048 > bytes) seems to be way too low This looks like an error in your code. The spec says: > PTHREAD_STACK_MIN > Minimum size in bytes of thread stack storage. > Minimum Accept

Too low PTHREAD_STACK_MIN value?

2014-03-11 Thread Roger Pau Monné
Hello, While debugging a pthread program that sets the stack size of pthreads, I've found out that the value PTHREAD_STACK_MIN is currently set (2048 bytes) seems to be way too low. As an example, the following simple program will segfault: --- #include #include #include #include #define MAL