https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64318

--- Comment #3 from zhouyan at me dot com ---
Here is version that shall be thread-safe, that produce the same problem,

#include <random>

int main ()
{
    _Cilk_for (int i = 0; i != 10000; ++i) {
        std::mt19937 eng(i);
        std::normal_distribution<> rnorm;
        rnorm(eng);
    }
}


The original program which I first found the issue was thread-safe. The MWE I
first submitted was created a little too hasty. In fact, neither mt19937 nor
normal_distribution is thread-safe. Anyway, I don't think race condition was
the problem.

Reply via email to