Merge pull request #1384

8b0e04cb monero.supp: add a suppression for noisy boost cond var signalling (moneromooo-monero)
c3527daf epee: signal cond var before unlocking (moneromooo-monero)
This commit is contained in:
Riccardo Spagni 2016-12-04 22:14:01 +02:00
commit 3c05aeda1b
No known key found for this signature in database
GPG key ID: 55432DF31CCD4FCD
2 changed files with 10 additions and 1 deletions

View file

@ -1010,7 +1010,7 @@ POP_WARNINGS
boost::unique_lock<boost::mutex> lock(local_shared_context->connect_mut); boost::unique_lock<boost::mutex> lock(local_shared_context->connect_mut);
auto connect_callback = [](boost::system::error_code ec_, boost::shared_ptr<local_async_context> shared_context) auto connect_callback = [](boost::system::error_code ec_, boost::shared_ptr<local_async_context> shared_context)
{ {
shared_context->connect_mut.lock(); shared_context->ec = ec_; shared_context->connect_mut.unlock(); shared_context->cond.notify_one(); shared_context->connect_mut.lock(); shared_context->ec = ec_; shared_context->cond.notify_one(); shared_context->connect_mut.unlock();
}; };
sock_.async_connect(remote_endpoint, boost::bind<void>(connect_callback, _1, local_shared_context)); sock_.async_connect(remote_endpoint, boost::bind<void>(connect_callback, _1, local_shared_context));

View file

@ -8,3 +8,12 @@
fun:_ULx86_64_step fun:_ULx86_64_step
... ...
} }
{
boost unlocks before signalling cond var
Helgrind:Misc
...
fun:pthread_cond_signal@*
fun:maybe_unlock_and_signal_one<boost::asio::detail::scoped_lock<boost::asio::detail::posix_mutex> >
...
}