Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5017 Discussions

report of false positive data race?

Oliver_K_
Beginner
279 Views

Hello,

I'm using Interl Inspector XE 2017. If I run 'Detect Deadlocks and Data Races' analysis I get a race condition dispalyed. If I run this analysis with option 'Enable debugger when problem detected', the threads mentioned by Inspecter XE are not at the dispayed code lines. I'm wondering what causes this behaviour (limitation by Inspector XE, false positive ...)

The code is compiled with gcc-6.3.1 (-std=c++14):

1   friend void intrusive_ptr_add_ref( context * ctx) noexcept {
2       ctx->use_count_.fetch_add( 1, std::memory_order_relaxed);
3    }

4    friend void intrusive_ptr_release( context * ctx) noexcept {
5        if ( 1 == ctx->use_count_.fetch_sub( 1, std::memory_order_release) ) {
6            std::atomic_thread_fence( std::memory_order_acquire);
7            deallocate_memory( ctx);
8        }
9    }

Inspector XE menitions a raced between line 2 and line 7.

thank you in advance,

Olive

0 Kudos
1 Reply
James_T_Intel
Moderator
279 Views

Please submit this to our Online Service Center at http://www.intel.com/supporttickets so that we can properly track your support request.

0 Kudos
Reply