Created attachment 1351594 [details] racy2.C There should be no race (likely a false positive), but libtsan reports a race. Example: $ scl enable devtoolset-6 bash $ g++ -fsanitize=thread -static-libtsan -g -o racy racy2.C -lpthread $ ./racy Expected results would be empty output, but actual output is a report about a race: [...] SUMMARY: ThreadSanitizer: data race /opt/rh/devtoolset-6/root/usr/include/c++/6.3.1/bits/unique_ptr.h:308 in std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter>::get() const The issue also happens in rhel7.
I could reproduce this with DTS 6, but DTS 7 looks fine: # g++ --version g++ (GCC) 7.2.1 20170829 (Red Hat 7.2.1-1) Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # g++ -fsanitize=thread -static-libtsan -g -o racy racy.C -lpthread # ./racy # So we should include this BZ in DTS 7.1.
Successfully reproduced with DTS-6, verified for devtoolset-7-libtsan-devel-7.3.1-5.4. No races are reported. VERIFIED.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:1293