[mpdecimal] Enable all platforms
Some platforms are currently disabled in the mpdecimal
package.
The segfaults on these platforms in the libmpdec++
tests are a
consequence of the relatively small default thread stack size of
musl
(128K).
The tests use std::thread
by default and assume at least 300K.
std::thread
cannot adjust the stack size.
For platforms with a low default stack size (e.g. AIX has only 96K)
there is an option to use pthreads
instead of std::thread
in the tests.
To be clear, both libmpdec++
and musl
are fine, the end user application
needs to take steps to avoid stack overflows.
With this diff the tests pass on Alpine i386:
--- a-mpdecimal-2.5.1/tests++/runshort.sh
+++ b-mpdecimal-2.5.1/tests++/runshort.sh
@@ -12,9 +12,11 @@
export MallocLogFile=/dev/null
export MallocDebugReport=crash
;;
- AIX)
+ AIX|Linux)
# The thread stack size on AIX (96K) makes std::thread unusable
# for runtest.cc, which needs around 300K.
+ #
+ # The same applies to Alpine Linux (musl).
THREAD="--pthread"
;;
*)
--- a-mpdecimal-2.5.1/tests++/runshort_alloc.sh
+++ b-mpdecimal-2.5.1/tests++/runshort_alloc.sh
@@ -12,9 +12,11 @@
export MallocLogFile=/dev/null
export MallocDebugReport=crash
;;
- AIX)
+ AIX|Linux)
# The thread stack size on AIX (96K) makes std::thread unusable
# for runtest.cc, which needs around 300K.
+ #
+ # The same applies to Alpine Linux (musl).
THREAD="--pthread"
;;
*)
Edited by Stefan Krah