Comment 3 for bug 1844022

Revision history for this message
Florian Weimer (fweimer) wrote :

No, the race condition is in your stack size test (which is written incorrectly), not in the stack creation.

However, this code is inherently race-prone anyway:

pthread_attr_t attr;
<initialize attr>
pthread_setattr_default_np(&attr)
std::thread t(...);

You just need something else in the process using std::thread which does not go through the wrapper you wrote to trigger this.