[llvm-branch-commits] [lld] r322647 - Merging r322041:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jan 17 05:13:01 PST 2018


Author: hans
Date: Wed Jan 17 05:13:00 2018
New Revision: 322647

URL: http://llvm.org/viewvc/llvm-project?rev=322647&view=rev
Log:
Merging r322041:
------------------------------------------------------------------------
r322041 | ruiu | 2018-01-08 15:12:42 -0800 (Mon, 08 Jan 2018) | 9 lines

Do not use parallelForEach to call maybeCompress().

Currently LLVM's paralellForEach has a problem with reentracy.
That caused https://bugs.llvm.org/show_bug.cgi?id=35788 (lld somtimes
hangs while linking Ruby 2.4) because maybeCompress calls writeTo which
uses paralellForEach.

This patch is to avoid using paralellForEach to call maybeCompress
to workaround the issue.
------------------------------------------------------------------------

Modified:
    lld/branches/release_60/   (props changed)
    lld/branches/release_60/ELF/Writer.cpp

Propchange: lld/branches/release_60/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jan 17 05:13:00 2018
@@ -1 +1 @@
-/lld/trunk:321983,321986,322259
+/lld/trunk:321983,321986,322041,322259

Modified: lld/branches/release_60/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/branches/release_60/ELF/Writer.cpp?rev=322647&r1=322646&r2=322647&view=diff
==============================================================================
--- lld/branches/release_60/ELF/Writer.cpp (original)
+++ lld/branches/release_60/ELF/Writer.cpp Wed Jan 17 05:13:00 2018
@@ -432,8 +432,8 @@ template <class ELFT> void Writer<ELFT>:
   // If -compressed-debug-sections is specified, we need to compress
   // .debug_* sections. Do it right now because it changes the size of
   // output sections.
-  parallelForEach(OutputSections,
-                  [](OutputSection *Sec) { Sec->maybeCompress<ELFT>(); });
+  for (OutputSection *Sec : OutputSections)
+    Sec->maybeCompress<ELFT>();
 
   Script->allocateHeaders(Phdrs);
 




More information about the llvm-branch-commits mailing list