-
Notifications
You must be signed in to change notification settings - Fork 243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CCB: Changed logic of work using boost conditional variable #3180
Comments
After merge #3471 we do not use multiple conditional variable or lockable objects for guarantee order of precedence of the following calls : In the current implementation, we use a single instance for a conditional variable and a lockable object. After merge #3471 all regression tests are passed. |
@theresalech we believe that this issue already fixed by #3471 |
@LitvinenkoIra thank you for letting us know! We will review as time allows before the Core 7.0 release. |
Closed via #3471 |
Bug Report
Data races related to Logger
Detailed analysis:
Note that the same mutex is locked before the shared data is updated,
but that mutex does not have to be locked across the call to notify_one.:
https://www.boost.org/doc/libs/1_66_0/doc/html/thread/synchronization.html#thread.synchronization.condvar_ref
In function Thread::threadFunc
This is not a lock for acquiring another lock.
This code part ensures correct notification sequence between Thread::start and threadFunc.
In Thread::start function after thread is created, we call Wait(),
but we cannot guarantee order of precedence of the following calls :
"Wait() in Thread::start" or "Broadcast in threadFunc".
sync_primitives::AutoLock auto_lock(thread->run_lock_); - is used to
guarantee call to "Wait() in Thread::start" before Broadcast.
Reproduction Steps
Expected Behavior
SDL should not crash
Observed Behavior
SDL crashed
OS & Version Information
The text was updated successfully, but these errors were encountered: