Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 9 Jan 2018 17:38:43 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r327733 - projects/clang600-import/contrib/llvm/tools/lld/ELF
Message-ID:  <201801091738.w09HchMQ012650@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Tue Jan  9 17:38:43 2018
New Revision: 327733
URL: https://svnweb.freebsd.org/changeset/base/327733

Log:
  Pull in r322041 from upstream lld trunk (by Rui Ueyama):
  
    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.
  
  This should fix potential hangs when linking parts of ruby24.

Modified:
  projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp

Modified: projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp
==============================================================================
--- projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp	Tue Jan  9 17:37:09 2018	(r327732)
+++ projects/clang600-import/contrib/llvm/tools/lld/ELF/Writer.cpp	Tue Jan  9 17:38:43 2018	(r327733)
@@ -432,8 +432,8 @@ template <class ELFT> void Writer<ELFT>::run() {
   // 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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801091738.w09HchMQ012650>