llvm-capstone/lld/COFF
Jeremy Drake 7a7da69fbe [LLD] [COFF] Avoid thread exhaustion on 32-bit Windows host
LLD on 32-bit Windows would frequently fail on large projects with
an exception "thread constructor failed: Exec format error".  The stack
trace pointed to this usage of std::async, and looking at the
implementation in libc++ it seems using std::async with
std::launch::async results in the immediate creation of a new thread
for every call.  This could result in a potentially unbounded number
of threads, depending on the number of input files.  This seems to
be hitting some limit in 32-bit Windows host.

I took the easy route, and only use threads on 64-bit Windows, not all
Windows as before.  I was thinking a more proper solution might
involve using a thread pool rather than blindly spawning any number
of new threads, but that may have other unforeseen consequences.

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D105506
2021-07-07 22:00:18 +03:00
..
CallGraphSort.cpp [COFF] Port CallGraphSort to COFF from ELF 2020-07-30 15:21:44 -07:00
CallGraphSort.h
Chunks.cpp lld-coff: Simplify a few lambda uses after 7975dd033c 2021-05-24 17:26:46 -07:00
Chunks.h [COFF] Remove a truncation assertion from setRVA 2021-05-13 19:37:14 -07:00
CMakeLists.txt [COFF] Port CallGraphSort to COFF from ELF 2020-07-30 15:21:44 -07:00
Config.h [LLD] [COFF] Fix up missing stdcall decorations in MinGW mode 2021-07-02 09:49:14 +03:00
DebugTypes.cpp [lld] Rename StringRef _lower() method calls to _insensitive() 2021-06-25 00:22:01 +03:00
DebugTypes.h [LLD][COFF] Simplify function. NFC. 2021-01-07 22:37:11 -05:00
DLL.cpp [LLD] [COFF] Remove a stray duplicate comment. NFC. 2021-06-17 13:02:35 +03:00
DLL.h
Driver.cpp [LLD] [COFF] Avoid thread exhaustion on 32-bit Windows host 2021-07-07 22:00:18 +03:00
Driver.h [lld-link] Add /reproduce: support for several flags 2021-02-22 16:52:49 -05:00
DriverUtils.cpp [OptTable] Rename PrintHelp to printHelp 2021-06-24 14:47:03 -07:00
ICF.cpp Revert "[COFF] Only consider associated EH sections during ICF" 2021-03-29 19:15:35 -07:00
ICF.h [lld-link] Add safe icf mode to lld-link, which does safe icf for all sections. 2021-03-03 14:52:33 -08:00
InputFiles.cpp [LLD] [COFF] Fix up missing stdcall decorations in MinGW mode 2021-07-02 09:49:14 +03:00
InputFiles.h [LLD] [COFF] Support linking directly against DLLs in MinGW mode 2021-07-02 09:49:13 +03:00
LLDMapFile.cpp [Support] Move LLD's parallel algorithm wrappers to support 2020-05-05 15:21:05 -07:00
LLDMapFile.h
LTO.cpp Reland "[lld-link] Enable addrsig table in COFF lto" 2021-04-29 15:54:12 -07:00
LTO.h
MapFile.cpp
MapFile.h
MarkLive.cpp
MarkLive.h
MinGW.cpp [LLD] [COFF] Fix the mingw --export-all-symbols behaviour with comdat symbols 2021-04-29 23:35:10 +03:00
MinGW.h Reapply [LLD] [COFF] Implement a GNU/ELF like -wrap option 2020-10-15 22:14:02 +03:00
Options.td [LLD] [COFF] Fix up missing stdcall decorations in MinGW mode 2021-07-02 09:49:14 +03:00
PDB.cpp [PDB] Do not record PGO or coverage public symbols 2021-05-19 12:41:31 -07:00
PDB.h Re-land "[PDB] Merge types in parallel when using ghashing" 2020-09-30 15:44:38 -07:00
README.md
Symbols.cpp [LLD] [COFF] Support linking directly against DLLs in MinGW mode 2021-07-02 09:49:13 +03:00
Symbols.h [LLD] [COFF] Support linking directly against DLLs in MinGW mode 2021-07-02 09:49:13 +03:00
SymbolTable.cpp [LLD] [COFF] Fix up missing stdcall decorations in MinGW mode 2021-07-02 09:49:14 +03:00
SymbolTable.h [LLD] [COFF] Fix up missing stdcall decorations in MinGW mode 2021-07-02 09:49:14 +03:00
TypeMerger.h [PDB] Use one func id DenseMap instead of per-source maps, NFC 2020-10-01 12:22:27 -07:00
Writer.cpp [LLD] [COFF] Support linking directly against DLLs in MinGW mode 2021-07-02 09:49:13 +03:00
Writer.h [LLD][COFF] Cover usage of LLD-as-a-library in tests 2020-09-24 15:07:50 -04:00

See docs/NewLLD.rst