<div dir="ltr">Nice! <div>What exactly did you run under tsan? <div>Is this is something like "ninja check-foo" (check-thin-lto?), I'd like to add this to our sanitizer bot. </div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 14, 2016 at 10:49 PM, Mehdi Amini via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: mehdi_amini<br>
Date: Sun May 15 00:49:47 2016<br>
New Revision: 269588<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=269588&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=269588&view=rev</a><br>
Log:<br>
ThinLTOCodeGenerator: fix race condition found using TSAN<br>
<br>
From: Mehdi Amini <<a href="mailto:mehdi.amini@apple.com">mehdi.amini@apple.com</a>><br>
<br>
Modified:<br>
    llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br>
<br>
Modified: llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp?rev=269588&r1=269587&r2=269588&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp (original)<br>
+++ llvm/trunk/lib/LTO/ThinLTOCodeGenerator.cpp Sun May 15 00:49:47 2016<br>
@@ -884,6 +884,11 @@ void ThinLTOCodeGenerator::run() {<br>
   auto GUIDPreservedSymbols =<br>
       computeGUIDPreservedSymbols(PreservedSymbols, TMBuilder.TheTriple);<br>
<br>
+  // Make sure that every module has an entry in the ExportLists to enable<br>
+  // threaded access to this map below<br>
+  for (auto &DefinedGVSummaries : ModuleToDefinedGVSummaries)<br>
+    ExportLists[DefinedGVSummaries.first()];<br>
+<br>
   // Parallel optimizer + codegen<br>
   {<br>
     ThreadPool Pool(ThreadCount);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>