ext-pmmpthread
ext-pmmpthread copied to clipboard
Race condition on class copying when a thread reads a Threaded object provided from another thread
When PTHREADS_INHERIT_NONE is used (or when a Threaded object is created using a class loaded after thread start), the class has to be copied on the fly by other threads when that Threaded object is read into said threads.
This is problematic because it may lead to races between the two threads, resulting in borked copies and/or segfaults.
This would have to be addressed by having the class copied to permanent storage when assigned to a Threaded member.