Jump to content

Runip Gopisetty

Members
  • Posts

    1
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Runip Gopisetty's Achievements

Member

Member (1/2)

1

Reputation

  1. Not sure if this topic is active. Here is some feedback. 1. Decouple the datatypes library from other core SystemC libraries. In other words it should be a light stand-alone library of its own. 2. Single unified bit vector library for all widths (like ac_int<W>). However having the range function for behavioral modeling (not synthesis) is also very useful. Currently we use the following c++-11 feature: /*----------------------------------------------------------------*/ // This uses a neat template alias trick introduced in C++-11 // to hide the underlying type of either a biguint or _bits_ull // inside a bv. This allows uniform use of bv<W> in the code // while hiding the underlying type // Refer to: Stroustrop's C++11 FAQ /*----------------------------------------------------------------*/ template<bool,int W> struct bv_traits { typedef biguint<W> type; }; template<int W> struct bv_traits<true,W> { typedef _bits_ull<W> type; }; template<int W> using bv = typename bv_traits<W<=64,W>::type; 3. Illegal shifts are a problem. Introduced an artificial layer with static assertion (C++-11) checks to mitigate the problem. Example of static assertion for illegal widths below. There are lots and lots of static and run-rime assertions like this. template <int W> class _bits_ull : public sc_uint_base { public: static const int width = W; enum { valid_ull_width = (W <= 64) }; enum { MAX_WIDTH = 64 // fits into unsigned long long }; // constructors _bits_ull() : sc_uint_base(W) { (void)cmn_static_assert<valid_ull_width>::Invalid_bits_ull_width; } 4. Speed of execution of bit-vectors is critical. I worked with Andy Goodrich to have a faster implementation of sc_biguint<W> and have it locally as a branch to 2.3.0. It does not seem to have made it into the latest standard (v2.3.3). This provides a dramatic improvement in speed. There are other things which can be done to speed it up further. 5. Recently I did some work on concurrency from within the SystemC simulation. Much to my surprise, I find the SystemC datatypes (range functions and the operator[int]) are not thread-safe. This is because of static variables and sc_vpool (sc_temporary) use. Here is an example which on the surface should work fine but has data_races. Note that we can have thread safety issues from either within or outside the SystemC simulation. Races can be found by clang++ thread sanitizer -fsanitize=thread data_race.cc #include <thread> #include <future> #include <systemc> using namespace sc_core; using namespace sc_dt; using namespace std; void thread_func() { sc_uint<32> b32; for (int i = 1; i < 32; i++) { b32[i] = 1; // RACE inside here b32.range(i, i-1) = 2; // RACE inside here } } std::vector<std::future<void>> futures; int main(int argc, char** argv) { const int N_THREADS = 2; for (int i = 0; i < N_THREADS; ++i) { auto f = std::async(std::launch::async, thread_func); futures.push_back(std::move(f)); } return 0; } ================== WARNING: ThreadSanitizer: data race (pid=19816) Read of size 4 at 0x0000016dfc90 by thread T2: #0 sc_core::sc_vpool<sc_dt::sc_uint_bitref>::allocate() /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:187:23 (data_race.x+0x4c63d5) #1 sc_dt::sc_uint_base::operator[](int) /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/datatypes/int/sc_uint_base.h:1207:55 (data_race.x+0x4c5f48) #2 thread_func() /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:15:9 (data_race.x+0x4c5c29) #3 void std::_Bind_simple<void (*())()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4ca7ba) #4 std::_Bind_simple<void (*())()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4ca685) #5 std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1348:6 (data_race.x+0x4ca55a) #6 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void> >::_M_invoke(std::_Any_data const&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1725:9 (data_race.x+0x4ca3a6) #7 std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:2136:14 (data_race.x+0x4c9fc1) #8 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:533:27 (data_race.x+0x4c9308) #9 void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:235:14 (data_race.x+0x4c9dc7) #10 std::result_of<void (std::__future_base::_State_baseV2::* const&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:259:14 (data_race.x+0x4c9cf8) #11 _ZNKSt12_Mem_fn_baseIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbELb1EEclIJPS1_S9_SA_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOSG_ /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:613:11 (data_race.x+0x4c9b6d) #12 void std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c9ace) #13 std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c9a45) #14 void std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> >() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:587:7 (data_race.x+0x4c951b) #15 pthread_once /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1433 (data_race.x+0x456d92) #16 __gthread_once(int*, void (*)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:699:12 (data_race.x+0x4c5e0b) #17 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:619:17 (data_race.x+0x4c92a5) #18 std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:392:2 (data_race.x+0x4c8ecb) #19 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1}::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1664:3 (data_race.x+0x4c8d3e) #20 void std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c8ca5) #21 std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c8c65) #22 std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()> >::_M_run() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/thread:196:13 (data_race.x+0x4c8b19) #23 execute_native_thread_routine /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:83 (data_race.x+0x54d601) Previous write of size 4 at 0x0000016dfc90 by thread T1: #0 sc_core::sc_vpool<sc_dt::sc_uint_bitref>::allocate() /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:188:11 (data_race.x+0x4c63f7) #1 sc_dt::sc_uint_base::operator[](int) /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/datatypes/int/sc_uint_base.h:1207:55 (data_race.x+0x4c5f48) #2 thread_func() /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:15:9 (data_race.x+0x4c5c29) #3 void std::_Bind_simple<void (*())()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4ca7ba) #4 std::_Bind_simple<void (*())()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4ca685) #5 std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1348:6 (data_race.x+0x4ca55a) #6 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void> >::_M_invoke(std::_Any_data const&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1725:9 (data_race.x+0x4ca3a6) #7 std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:2136:14 (data_race.x+0x4c9fc1) #8 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:533:27 (data_race.x+0x4c9308) #9 void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:235:14 (data_race.x+0x4c9dc7) #10 std::result_of<void (std::__future_base::_State_baseV2::* const&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:259:14 (data_race.x+0x4c9cf8) #11 _ZNKSt12_Mem_fn_baseIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbELb1EEclIJPS1_S9_SA_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOSG_ /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:613:11 (data_race.x+0x4c9b6d) #12 void std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c9ace) #13 std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c9a45) #14 void std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> >() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:587:7 (data_race.x+0x4c951b) #15 pthread_once /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1433 (data_race.x+0x456d92) #16 __gthread_once(int*, void (*)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:699:12 (data_race.x+0x4c5e0b) #17 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:619:17 (data_race.x+0x4c92a5) #18 std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:392:2 (data_race.x+0x4c8ecb) #19 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1}::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1664:3 (data_race.x+0x4c8d3e) #20 void std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c8ca5) #21 std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c8c65) #22 std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()> >::_M_run() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/thread:196:13 (data_race.x+0x4c8b19) #23 execute_native_thread_routine /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:83 (data_race.x+0x54d601) Location is global 'sc_dt::sc_uint_bitref::m_pool' of size 24 at 0x0000016dfc90 (data_race.x+0x0000016dfc90) Thread T2 (tid=19820, running) created by main thread at: #0 pthread_create /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992 (data_race.x+0x433b36) #1 __gthread_create /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:662 (data_race.x+0x54d8f4) #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:163 (data_race.x+0x54d8f4) #3 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1661:14 (data_race.x+0x4c7b04) #4 void __gnu_cxx::new_allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/ext/new_allocator.h:120:23 (data_race.x+0x4c7a46) #5 void std::allocator_traits<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >&, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/alloc_traits.h:455:8 (data_race.x+0x4c77cd) #6 std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:520:4 (data_race.x+0x4c74a3) #7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:615:18 (data_race.x+0x4c7234) #8 std::__shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:1099:14 (data_race.x+0x4c7157) #9 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:319:4 (data_race.x+0x4c70ed) #10 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::allocate_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:619:14 (data_race.x+0x4c703d) #11 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::make_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:635:14 (data_race.x+0x4c6f3b) #12 std::shared_ptr<std::__future_base::_State_baseV2> std::__future_base::_S_make_async_state<std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1702:14 (data_race.x+0x4c6c0b) #13 std::future<std::result_of<std::decay<void (&)()>::type ()>::type> std::async<void (&)()>(std::launch, void (&)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1716:18 (data_race.x+0x4c61ac) #14 main /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:29:18 (data_race.x+0x4c5cd1) Thread T1 (tid=19819, finished) created by main thread at: #0 pthread_create /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992 (data_race.x+0x433b36) #1 __gthread_create /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:662 (data_race.x+0x54d8f4) #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:163 (data_race.x+0x54d8f4) #3 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1661:14 (data_race.x+0x4c7b04) #4 void __gnu_cxx::new_allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/ext/new_allocator.h:120:23 (data_race.x+0x4c7a46) #5 void std::allocator_traits<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >&, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/alloc_traits.h:455:8 (data_race.x+0x4c77cd) #6 std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:520:4 (data_race.x+0x4c74a3) #7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:615:18 (data_race.x+0x4c7234) #8 std::__shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:1099:14 (data_race.x+0x4c7157) #9 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:319:4 (data_race.x+0x4c70ed) #10 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::allocate_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:619:14 (data_race.x+0x4c703d) #11 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::make_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:635:14 (data_race.x+0x4c6f3b) #12 std::shared_ptr<std::__future_base::_State_baseV2> std::__future_base::_S_make_async_state<std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1702:14 (data_race.x+0x4c6c0b) #13 std::future<std::result_of<std::decay<void (&)()>::type ()>::type> std::async<void (&)()>(std::launch, void (&)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1716:18 (data_race.x+0x4c61ac) #14 main /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:29:18 (data_race.x+0x4c5cd1) SUMMARY: ThreadSanitizer: data race /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:187:23 in sc_core::sc_vpool<sc_dt::sc_uint_bitref>::allocate() ================== ================== WARNING: ThreadSanitizer: data race (pid=19816) Read of size 4 at 0x0000016dfc70 by thread T2: #0 sc_core::sc_vpool<sc_dt::sc_uint_subref>::allocate() /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:187:23 (data_race.x+0x4c6538) #1 sc_dt::sc_uint_base::range(int, int) /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/datatypes/int/sc_uint_base.h:1272:55 (data_race.x+0x4c6001) #2 thread_func() /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:16:13 (data_race.x+0x4c5c45) #3 void std::_Bind_simple<void (*())()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4ca7ba) #4 std::_Bind_simple<void (*())()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4ca685) #5 std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1348:6 (data_race.x+0x4ca55a) #6 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void> >::_M_invoke(std::_Any_data const&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1725:9 (data_race.x+0x4ca3a6) #7 std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:2136:14 (data_race.x+0x4c9fc1) #8 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:533:27 (data_race.x+0x4c9308) #9 void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:235:14 (data_race.x+0x4c9dc7) #10 std::result_of<void (std::__future_base::_State_baseV2::* const&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:259:14 (data_race.x+0x4c9cf8) #11 _ZNKSt12_Mem_fn_baseIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbELb1EEclIJPS1_S9_SA_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOSG_ /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:613:11 (data_race.x+0x4c9b6d) #12 void std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c9ace) #13 std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c9a45) #14 void std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> >() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:587:7 (data_race.x+0x4c951b) #15 pthread_once /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1433 (data_race.x+0x456d92) #16 __gthread_once(int*, void (*)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:699:12 (data_race.x+0x4c5e0b) #17 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:619:17 (data_race.x+0x4c92a5) #18 std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:392:2 (data_race.x+0x4c8ecb) #19 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1}::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1664:3 (data_race.x+0x4c8d3e) #20 void std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c8ca5) #21 std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c8c65) #22 std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()> >::_M_run() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/thread:196:13 (data_race.x+0x4c8b19) #23 execute_native_thread_routine /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:83 (data_race.x+0x54d601) Previous write of size 4 at 0x0000016dfc70 by thread T1: #0 sc_core::sc_vpool<sc_dt::sc_uint_subref>::allocate() /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:188:11 (data_race.x+0x4c655a) #1 sc_dt::sc_uint_base::range(int, int) /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/datatypes/int/sc_uint_base.h:1272:55 (data_race.x+0x4c6001) #2 thread_func() /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:16:13 (data_race.x+0x4c5c45) #3 void std::_Bind_simple<void (*())()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4ca7ba) #4 std::_Bind_simple<void (*())()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4ca685) #5 std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1348:6 (data_race.x+0x4ca55a) #6 std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<void>, std::__future_base::_Result_base::_Deleter>, std::_Bind_simple<void (*())()>, void> >::_M_invoke(std::_Any_data const&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1725:9 (data_race.x+0x4ca3a6) #7 std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:2136:14 (data_race.x+0x4c9fc1) #8 std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:533:27 (data_race.x+0x4c9308) #9 void std::__invoke_impl<void, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::__invoke_memfun_deref, void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:235:14 (data_race.x+0x4c9dc7) #10 std::result_of<void (std::__future_base::_State_baseV2::* const&(std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&))(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::type std::__invoke<void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(void (std::__future_base::_State_baseV2::* const&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:259:14 (data_race.x+0x4c9cf8) #11 _ZNKSt12_Mem_fn_baseIMNSt13__future_base13_State_baseV2EFvPSt8functionIFSt10unique_ptrINS0_12_Result_baseENS4_8_DeleterEEvEEPbELb1EEclIJPS1_S9_SA_EEEDTclsr3stdE8__invokedtdefpT6_M_pmfspclsr3stdE7forwardIT_Efp_EEEDpOSG_ /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:613:11 (data_race.x+0x4c9b6d) #12 void std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::_M_invoke<0ul, 1ul, 2ul>(std::_Index_tuple<0ul, 1ul, 2ul>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c9ace) #13 std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c9a45) #14 void std::__once_call_impl<std::_Bind_simple<std::_Mem_fn<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> (std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*)> >() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:587:7 (data_race.x+0x4c951b) #15 pthread_once /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:1433 (data_race.x+0x456d92) #16 __gthread_once(int*, void (*)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/x86_64-pc-linux-gnu/bits/gthr-default.h:699:12 (data_race.x+0x4c5e0b) #17 void std::call_once<void (std::__future_base::_State_baseV2::*)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*>(std::once_flag&, void (std::__future_base::_State_baseV2::*&&)(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*), std::__future_base::_State_baseV2*&&, std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*&&, bool*&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/mutex:619:17 (data_race.x+0x4c92a5) #18 std::__future_base::_State_baseV2::_M_set_result(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>, bool) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:392:2 (data_race.x+0x4c8ecb) #19 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1}::operator()() const /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1664:3 (data_race.x+0x4c8d3e) #20 void std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::_M_invoke<>(std::_Index_tuple<>) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1399:18 (data_race.x+0x4c8ca5) #21 std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()>::operator()() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/functional:1389:16 (data_race.x+0x4c8c65) #22 std::thread::_State_impl<std::_Bind_simple<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&)::{lambda()#1} ()> >::_M_run() /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/thread:196:13 (data_race.x+0x4c8b19) #23 execute_native_thread_routine /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:83 (data_race.x+0x54d601) Location is global 'sc_dt::sc_uint_subref::m_pool' of size 24 at 0x0000016dfc70 (data_race.x+0x0000016dfc70) Thread T2 (tid=19820, running) created by main thread at: #0 pthread_create /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992 (data_race.x+0x433b36) #1 __gthread_create /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:662 (data_race.x+0x54d8f4) #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:163 (data_race.x+0x54d8f4) #3 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1661:14 (data_race.x+0x4c7b04) #4 void __gnu_cxx::new_allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/ext/new_allocator.h:120:23 (data_race.x+0x4c7a46) #5 void std::allocator_traits<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >&, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/alloc_traits.h:455:8 (data_race.x+0x4c77cd) #6 std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:520:4 (data_race.x+0x4c74a3) #7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:615:18 (data_race.x+0x4c7234) #8 std::__shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:1099:14 (data_race.x+0x4c7157) #9 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:319:4 (data_race.x+0x4c70ed) #10 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::allocate_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:619:14 (data_race.x+0x4c703d) #11 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::make_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:635:14 (data_race.x+0x4c6f3b) #12 std::shared_ptr<std::__future_base::_State_baseV2> std::__future_base::_S_make_async_state<std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1702:14 (data_race.x+0x4c6c0b) #13 std::future<std::result_of<std::decay<void (&)()>::type ()>::type> std::async<void (&)()>(std::launch, void (&)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1716:18 (data_race.x+0x4c61ac) #14 main /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:29:18 (data_race.x+0x4c5cd1) Thread T1 (tid=19819, finished) created by main thread at: #0 pthread_create /var/tmp/x86_64-rhel6/llvm-6.0.1.src/projects/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:992 (data_race.x+0x433b36) #1 __gthread_create /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/include/x86_64-pc-linux-gnu/bits/gthr-default.h:662 (data_race.x+0x54d8f4) #2 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) /var/tmp/x86_64-rhel6/gcc-6.1.0/objdir/x86_64-pc-linux-gnu/libstdc++-v3/src/c++11/../../../../../../gcc-6.1.0/libstdc++-v3/src/c++11/thread.cc:163 (data_race.x+0x54d8f4) #3 std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>::_Async_state_impl(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1661:14 (data_race.x+0x4c7b04) #4 void __gnu_cxx::new_allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/ext/new_allocator.h:120:23 (data_race.x+0x4c7a46) #5 void std::allocator_traits<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > >::construct<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >&, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/alloc_traits.h:455:8 (data_race.x+0x4c77cd) #6 std::_Sp_counted_ptr_inplace<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:520:4 (data_race.x+0x4c74a3) #7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>*, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:615:18 (data_race.x+0x4c7234) #8 std::__shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr_base.h:1099:14 (data_race.x+0x4c7157) #9 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >::shared_ptr<std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::_Sp_make_shared_tag, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:319:4 (data_race.x+0x4c70ed) #10 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::allocate_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> >, std::_Bind_simple<void (*())()> >(std::allocator<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > const&, std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:619:14 (data_race.x+0x4c703d) #11 std::shared_ptr<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void> > std::make_shared<std::__future_base::_Async_state_impl<std::_Bind_simple<void (*())()>, void>, std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/bits/shared_ptr.h:635:14 (data_race.x+0x4c6f3b) #12 std::shared_ptr<std::__future_base::_State_baseV2> std::__future_base::_S_make_async_state<std::_Bind_simple<void (*())()> >(std::_Bind_simple<void (*())()>&&) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1702:14 (data_race.x+0x4c6c0b) #13 std::future<std::result_of<std::decay<void (&)()>::type ()>::type> std::async<void (&)()>(std::launch, void (&)()) /tools/oss/packages/x86_64-rhel6/gcc/6.1.0/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/future:1716:18 (data_race.x+0x4c61ac) #14 main /projects/ntsw-arch/AV/users/runipg/rg_arch40/arch/common/test/data_race/data_race.cc:29:18 (data_race.x+0x4c5cd1) SUMMARY: ThreadSanitizer: data race /projects/ntsw-arch-public/tools/systemc-22sep2015/systemc-2.3.0/x86_64-gcc8/include/sysc/utils/sc_temporary.h:187:23 in sc_core::sc_vpool<sc_dt::sc_uint_subref>::allocate() ================== ThreadSanitizer: reported 2 warnings 6. A common pattern is to use a fixed width slice of a bit-vector (both set and get). This should be optimized to take advantage of compile time templated left and right (L,R) parameters. For example: template< int W > class biguint { public: ... template<int L, int R, int W2> void set_fslc (const biguint<W2> &b); template<int L, int R> biguint<L - R + 1> fslc () const; } There are other interesting problems to solve as well but don't want to make this post too long.
×
×
  • Create New...