<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - data race in lld/COFF/ICF.cpp"
   href="https://bugs.llvm.org/show_bug.cgi?id=36823">36823</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>data race in lld/COFF/ICF.cpp
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>COFF
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm@inglorion.net
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>WARNING: ThreadSanitizer: data race (pid=46028)
  Write of size 8 at 0x7ba000075f80 by thread T11:
    #0 __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> ></span >
std::__stable_partition_adaptive<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, lld::coff::SectionChunk**,</span >
__gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long, unsigned
long, bool)::$_0>,
long>(__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,</span >
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long,</span >
unsigned long, bool)::$_0>, long, lld::coff::SectionChunk**, long)
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1572
(lld+0xe7c6d8)
    #1 __stable_partition<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk
**, std::vector<lld::coff::SectionChunk *,
std::allocator<lld::coff::SectionChunk *> > >,
__gnu_cxx::__ops::_Iter_pred<(lambda at
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:103:59)> >
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1626
(lld+0xe7a265)
    #2 stable_partition<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk
**, std::vector<lld::coff::SectionChunk *,
std::allocator<lld::coff::SectionChunk *> > >, (lambda at
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:103:59)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1661
(lld+0xe7a265)
    #3 segregate /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:102
(lld+0xe7a265)
    #4 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:247
(lld+0xe7f45d)
    #5 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7f45d)
    #6 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe7d514)
    #7 forEachClassRange
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:185 (lld+0xe7d514)
    #8 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:205
(lld+0xe7d514)
    #9 operator()
/usr/local/google/home/inglorion/llvm/llvm/include/llvm/Support/Parallel.h:179
(lld+0xe7d514)
    #10 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7d514)
    #11 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe89790)
    #12 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:134
(lld+0xe89790)
    #13 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe89790)
    #14 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe88fa2)
    #15 work
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:111
(lld+0xe88fa2)
    #16 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80
(lld+0xe890f3)
    #17 __invoke_impl<void, (lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:60
(lld+0xe890f3)
    #18 __invoke<(lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95
(lld+0xe890f3)
    #19 _M_invoke<0>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:234
(lld+0xe890f3)
    #20 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:243
(lld+0xe890f3)
    #21 _M_run
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:186
(lld+0xe890f3)
    #22 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Previous read of size 8 at 0x7ba000075f80 by thread T10:
    #0 findBoundary /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:173
(lld+0xe7d715)
    #1 forEachClassRange
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:181 (lld+0xe7d715)
    #2 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:205
(lld+0xe7d715)
    #3 operator()
/usr/local/google/home/inglorion/llvm/llvm/include/llvm/Support/Parallel.h:179
(lld+0xe7d715)
    #4 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7d715)
    #5 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe89790)
    #6 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:134
(lld+0xe89790)
    #7 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe89790)
    #8 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe88fa2)
    #9 work
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:111
(lld+0xe88fa2)
    #10 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80
(lld+0xe890f3)
    #11 __invoke_impl<void, (lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:60
(lld+0xe890f3)
    #12 __invoke<(lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95
(lld+0xe890f3)
    #13 _M_invoke<0>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:234
(lld+0xe890f3)
    #14 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:243
(lld+0xe890f3)
    #15 _M_run
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:186
(lld+0xe890f3)
    #16 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Location is heap block of size 16384 at 0x7ba000074000 allocated by main
thread:
    #0 operator new(unsigned long)
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:57
(lld+0xdd10c9)
    #1 allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:111
(lld+0xe7b311)
    #2 allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:436
(lld+0xe7b311)
    #3 _M_allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:172
(lld+0xe7b311)
    #4 _M_realloc_insert<lld::coff::SectionChunk *const &>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/vector.tcc:406
(lld+0xe7b311)
    #5 push_back
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:948
(lld+0xe7b311)
    #6 run /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:221
(lld+0xe7b311)
    #7 lld::coff::doICF(llvm::ArrayRef<lld::coff::Chunk*>)
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:272 (lld+0xe7ba9c)
    #8 lld::coff::LinkerDriver::link(llvm::ArrayRef<char const*>)
/usr/local/google/home/inglorion/llvm/lld/COFF/Driver.cpp:1459 (lld+0xe55cdc)
    #9 lld::coff::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&)
/usr/local/google/home/inglorion/llvm/lld/COFF/Driver.cpp:72 (lld+0xe4a93f)
    #10 main /usr/local/google/home/inglorion/llvm/lld/tools/lld/lld.cpp:129
(lld+0xdd216b)

  Thread T11 (tid=46096, running) created by thread T9 at:
    #0 pthread_create
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965
(lld+0xd68655)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State,
std::default_delete<std::thread::_State> >, void (*)()) ??:?
(libstdc++.so.6+0xbca98)
    #2 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Thread T10 (tid=46095, running) created by thread T9 at:
    #0 pthread_create
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965
(lld+0xd68655)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State,
std::default_delete<std::thread::_State> >, void (*)()) ??:?
(libstdc++.so.6+0xbca98)
    #2 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

SUMMARY: ThreadSanitizer: data race
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1572
in __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> ></span >
std::__stable_partition_adaptive<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, lld::coff::SectionChunk**,</span >
__gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long, unsigned
long, bool)::$_0>,
long>(__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,</span >
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long,</span >
unsigned long, bool)::$_0>, long, lld::coff::SectionChunk**, long)
==================
==================
WARNING: ThreadSanitizer: data race (pid=46028)
  Write of size 8 at 0x7ba000075f88 by thread T11:
    #0 memmove
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/../sanitizer_common/sanitizer_common_interceptors.inc:775
(lld+0xd71f8d)
    #1 __copy_m<lld::coff::SectionChunk *>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368
(lld+0xe7c741)
    #2 __copy_move_a<true, lld::coff::SectionChunk **, lld::coff::SectionChunk
**>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:385
(lld+0xe7c741)
    #3 __copy_move_a2<true, lld::coff::SectionChunk **,
__gnu_cxx::__normal_iterator<lld::coff::SectionChunk **,
std::vector<lld::coff::SectionChunk *, std::allocator<lld::coff::SectionChunk
*> > > >
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:422
(lld+0xe7c741)
    #4 move<lld::coff::SectionChunk **,
__gnu_cxx::__normal_iterator<lld::coff::SectionChunk **,
std::vector<lld::coff::SectionChunk *, std::allocator<lld::coff::SectionChunk
*> > > >
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:487
(lld+0xe7c741)
    #5 __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> ></span >
std::__stable_partition_adaptive<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, lld::coff::SectionChunk**,</span >
__gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long, unsigned
long, bool)::$_0>,
long>(__gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__normal_iterator<lld::coff::SectionChunk**,</span >
std::vector<lld::coff::SectionChunk*, std::allocator<lld::coff::SectionChunk*>
<span class="quote">> >, __gnu_cxx::__ops::_Iter_pred<lld::coff::ICF::segregate(unsigned long,</span >
unsigned long, bool)::$_0>, long, lld::coff::SectionChunk**, long)
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1581
(lld+0xe7c741)
    #6 __stable_partition<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk
**, std::vector<lld::coff::SectionChunk *,
std::allocator<lld::coff::SectionChunk *> > >,
__gnu_cxx::__ops::_Iter_pred<(lambda at
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:103:59)> >
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1626
(lld+0xe7a265)
    #7 stable_partition<__gnu_cxx::__normal_iterator<lld::coff::SectionChunk
**, std::vector<lld::coff::SectionChunk *,
std::allocator<lld::coff::SectionChunk *> > >, (lambda at
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:103:59)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algo.h:1661
(lld+0xe7a265)
    #8 segregate /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:102
(lld+0xe7a265)
    #9 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:247
(lld+0xe7f45d)
    #10 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7f45d)
    #11 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe7d514)
    #12 forEachClassRange
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:185 (lld+0xe7d514)
    #13 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:205
(lld+0xe7d514)
    #14 operator()
/usr/local/google/home/inglorion/llvm/llvm/include/llvm/Support/Parallel.h:179
(lld+0xe7d514)
    #15 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7d514)
    #16 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe89790)
    #17 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:134
(lld+0xe89790)
    #18 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe89790)
    #19 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe88fa2)
    #20 work
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:111
(lld+0xe88fa2)
    #21 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80
(lld+0xe890f3)
    #22 __invoke_impl<void, (lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:60
(lld+0xe890f3)
    #23 __invoke<(lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95
(lld+0xe890f3)
    #24 _M_invoke<0>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:234
(lld+0xe890f3)
    #25 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:243
(lld+0xe890f3)
    #26 _M_run
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:186
(lld+0xe890f3)
    #27 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Previous read of size 8 at 0x7ba000075f88 by thread T10:
    #0 findBoundary /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:173
(lld+0xe7d715)
    #1 forEachClassRange
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:181 (lld+0xe7d715)
    #2 operator() /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:205
(lld+0xe7d715)
    #3 operator()
/usr/local/google/home/inglorion/llvm/llvm/include/llvm/Support/Parallel.h:179
(lld+0xe7d715)
    #4 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe7d715)
    #5 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe89790)
    #6 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:134
(lld+0xe89790)
    #7 _M_invoke
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:316
(lld+0xe89790)
    #8 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/std_function.h:706
(lld+0xe88fa2)
    #9 work
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:111
(lld+0xe88fa2)
    #10 operator()
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80
(lld+0xe890f3)
    #11 __invoke_impl<void, (lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:60
(lld+0xe890f3)
    #12 __invoke<(lambda at
/usr/local/google/home/inglorion/llvm/llvm/lib/Support/Parallel.cpp:80:21)>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/invoke.h:95
(lld+0xe890f3)
    #13 _M_invoke<0>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:234
(lld+0xe890f3)
    #14 operator()
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:243
(lld+0xe890f3)
    #15 _M_run
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/thread:186
(lld+0xe890f3)
    #16 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Location is heap block of size 16384 at 0x7ba000074000 allocated by main
thread:
    #0 operator new(unsigned long)
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc:57
(lld+0xdd10c9)
    #1 allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/ext/new_allocator.h:111
(lld+0xe7b311)
    #2 allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/alloc_traits.h:436
(lld+0xe7b311)
    #3 _M_allocate
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:172
(lld+0xe7b311)
    #4 _M_realloc_insert<lld::coff::SectionChunk *const &>
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/vector.tcc:406
(lld+0xe7b311)
    #5 push_back
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_vector.h:948
(lld+0xe7b311)
    #6 run /usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:221
(lld+0xe7b311)
    #7 lld::coff::doICF(llvm::ArrayRef<lld::coff::Chunk*>)
/usr/local/google/home/inglorion/llvm/lld/COFF/ICF.cpp:272 (lld+0xe7ba9c)
    #8 lld::coff::LinkerDriver::link(llvm::ArrayRef<char const*>)
/usr/local/google/home/inglorion/llvm/lld/COFF/Driver.cpp:1459 (lld+0xe55cdc)
    #9 lld::coff::link(llvm::ArrayRef<char const*>, bool, llvm::raw_ostream&)
/usr/local/google/home/inglorion/llvm/lld/COFF/Driver.cpp:72 (lld+0xe4a93f)
    #10 main /usr/local/google/home/inglorion/llvm/lld/tools/lld/lld.cpp:129
(lld+0xdd216b)

  Thread T11 (tid=46096, running) created by thread T9 at:
    #0 pthread_create
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965
(lld+0xd68655)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State,
std::default_delete<std::thread::_State> >, void (*)()) ??:?
(libstdc++.so.6+0xbca98)
    #2 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

  Thread T10 (tid=46095, running) created by thread T9 at:
    #0 pthread_create
/usr/local/google/home/inglorion/llvm/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc:965
(lld+0xd68655)
    #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State,
std::default_delete<std::thread::_State> >, void (*)()) ??:?
(libstdc++.so.6+0xbca98)
    #2 std::error_code::default_error_condition() const ??:?
(libstdc++.so.6+0xbc7e2)

SUMMARY: ThreadSanitizer: data race
/usr/lib/gcc/x86_64-linux-gnu/7.3.0/../../../../include/c++/7.3.0/bits/stl_algobase.h:368
in __copy_m<lld::coff::SectionChunk *>
==================
ThreadSanitizer: reported 2 warnings</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>