commit | 8dd9d46e585ceb5659549bb85b1399fbddce1f5d | [log] [tgz] |
---|---|---|
author | Zim <zezeozue@google.com> | Wed Apr 29 15:18:09 2020 +0100 |
committer | Zim <zezeozue@google.com> | Wed Apr 29 16:05:55 2020 +0100 |
tree | cca67b0b1c673cdde0cfa982d758bbcc1dea5512 | |
parent | e1466464aee9110b2d852c82dd04ed9aa9ed9aa5 [diff] |
Fix wrong initialization order in FAdviser FAdviser declares thread_ before mutex_. This can cause a race leading to crash when we start the thread_ (in the initializer list) and the new thread tries to acquire mutex_ before it is initialized. Now, we declare mutex_ before thread_ ensuring that mutex_ will always be initialized before thread_ runs. Test: m Bug: 154416156 Change-Id: I9a6ab9bf744c2158fdf14a03c70fe95cf9ad61bc