tests: posix: pthread: init pthread_attr_t on each iteration
The `test_pthread_descriptor_leak` test was causing a kernel
panic on some platforms. Initially, it was not clear why.
The usual cases were examined - race conditions, stack sizes,
etc. Still no luck.
As it turns out, recycling a thread stack (or at least the
`pthread_attr_t`) in-place does not work on some platforms,
and we need to reinitialize the `pthread_attr_t` and set
set the stack property again prior to calling
`pthread_create()`.
Signed-off-by:
Christopher Friedt <cfriedt@meta.com>
Loading
Please sign in to comment