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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1844022

Title:
  pthread_setattr_default_np race condition with pthread_create.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1844022/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to