You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the upcoming glibc version 2.34, PTHREAD_STACK_MIN will be defined like this if _DYNAMIC_STACK_SIZE_SOURCE is defined (it is enabled by _GNU_SOURCE):
The glibc maintainers made this change (and a similar change to the definitions of SIGSTKSZ and MINSIGSTKSZ) to deal with CPUs that have varying stack size requirements depending on optional components. This has led to compilation failures for a number of packages, including polyml, due to use of PTHREAD_STACK_MIN in an #if in libpolyml/sighandler.cpp. Are you open to doing a run-time check instead of a compile-time check, something like this?
#ifdef PTHREAD_STACK_MIN
size_t stacksize = PTHREAD_STACK_MIN; // Only small stack.
if (stacksize < 4096U) // But not too small; FreeBSD makes it 2k
stacksize = 4096U;
pthread_attr_setstacksize(&attrs, stacksize);
#endif
The text was updated successfully, but these errors were encountered:
That seems sensible. Do you want to provide a pull request for this since you may be able to test it? Include a comment to say that PTHREAD_STACK_MIN may be defined as a function call otherwise there's the possibility that it could be changed back at some point.
In the upcoming glibc version 2.34,
PTHREAD_STACK_MIN
will be defined like this if_DYNAMIC_STACK_SIZE_SOURCE
is defined (it is enabled by_GNU_SOURCE
):The glibc maintainers made this change (and a similar change to the definitions of
SIGSTKSZ
andMINSIGSTKSZ
) to deal with CPUs that have varying stack size requirements depending on optional components. This has led to compilation failures for a number of packages, including polyml, due to use ofPTHREAD_STACK_MIN
in an#if
inlibpolyml/sighandler.cpp
. Are you open to doing a run-time check instead of a compile-time check, something like this?The text was updated successfully, but these errors were encountered: