From owner-svn-src-projects@freebsd.org Tue Jan 9 17:38:44 2018 Return-Path: Delivered-To: svn-src-projects@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3464E65ED1 for ; Tue, 9 Jan 2018 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F8A46364B; Tue, 9 Jan 2018 17:38:44 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E6FFC1A027; Tue, 9 Jan 2018 17:38:43 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w09HchZB012651; Tue, 9 Jan 2018 17:38:43 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w09HchMQ012650; Tue, 9 Jan 2018 17:38:43 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201801091738.w09HchMQ012650@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Tue, 9 Jan 2018 17:38:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r327733 - projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Group: projects X-SVN-Commit-Author: dim X-SVN-Commit-Paths: projects/clang600-import/contrib/llvm/tools/lld/ELF X-SVN-Commit-Revision: 327733 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Jan 2018 17:38:44 -0000 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 void Writer::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(); }); + for (OutputSection *Sec : OutputSections) + Sec->maybeCompress(); Script->allocateHeaders(Phdrs);