|
Boost Users : |
Subject: Re: [Boost-users] boost::thread and helgrind
From: Frederick Roth (f-roth_at_[hidden])
Date: 2012-01-16 04:48:28
On Thu, 12 Jan 2012 03:13:38 -0800 (PST), Vicente Botet wrote:
> Frederick Roth wrote
>>
>> On Thu, 05 Jan 2012 09:04:46 +0100, Frederick Roth wrote:
>>> On Wed, 04 Jan 2012 22:01:01 +0100, Vicente J. Botet Escriba wrote:
>>>> Le 04/01/12 09:46, Frederick Roth a écrit :
>>>>> I am currently fooling around with boost::thread. After writing a
>>>>> short example program (featuring boost::thread and
>>>>> boost::interprocess::interprocess_semaphore), I ran helgrind
>>>>> against
>>>>> it and got some "Possible data race" errors.
>>>>>
>>>>
>>
>
> Hi, I missed you last post.
>
> Anyway, the trace "Possible data race during read of size 4 at
> 0x46c6d32c by
> thread #3" doesn't help me too much. Is there any way helring can
> give the
> c++ variable names?
I got it to show the line-numbers in the boost library (once.hpp and
once.cpp) i give you the output below. I hope it helps.
==11280== Possible data race during read of size 4 at 0x403c1ec by
thread #3
==11280== at 0x402E873:
_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_.constprop.111
(once.hpp:50)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
==11280== This conflicts with a previous write of size 4 by thread #2
==11280== at 0x402E981:
_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_.constprop.111
(once.hpp:77)
==11280== by 0x402EB84:
boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
(thread.cpp:105)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
==11280==
==11280== Possible data race during read of size 4 at 0x403c1e8 by
thread #3
==11280== at 0x402E879:
_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_.constprop.111
(once.hpp:50)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
==11280== This conflicts with a previous write of size 4 by thread #2
==11280== at 0x402E96C:
_ZN5boost9call_onceIPFvvEEEvRNS_9once_flagET_.constprop.111
(once.hpp:77)
==11280== by 0x402EB84:
boost::detail::set_current_thread_data(boost::detail::thread_data_base*)
(thread.cpp:105)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
==11280==
==11280== Possible data race during read of size 4 at 0x403c24c by
thread #3
==11280== at 0x4036AAF: boost::detail::get_once_per_thread_epoch()
(once.cpp:42)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
==11280== This conflicts with a previous write of size 4 by thread #2
==11280== at 0x48D926F9: pthread_key_create (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48D8DCD2: start_thread (in
/lib/libpthread-2.14.90.so)
==11280== by 0x48C9E83D: clone (in /lib/libc-2.14.90.so)
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net