Hi,
thanks for taking a look!
On Sat, Dec 19, 2020 at 10:37:49PM +0200, Paul Irofti wrote:
> Not sure caching is the culprit, but will definitely investigate this when I
> get back. If you don't mind asking, how did you trigger this issue in real
> life?
This was found by the mpdecimal-2.5.1 release candidate test suite. libmpdec++
(apitest.cc) has many tests of the form:
assertRaises(ConversionSyntax, [&](){ Decimal("xyz", xc); });
assertRaises() does pretty much the same as the doit() function in test.cc
in this issue, and apitest.cc runs the tests in parallel in 35 threads.
A single run of the tests usually does not trigger this. I wrote a script
(initially for AIX/xlc) that runs the tests with all libmpdec configs, all
optimization levels and all test suite flags.
This boils down to > 400 cases and the script is stress testing the OS and
tool chain for a week.
On AIX it found that errno still needs -D_THREAD_SAFE to be actually thread
safe, and on OpenBSD this issue. Both issues were only discovered after
several days`of running the tests.
Cheers,
Stefan Krah