[all-commits] [llvm/llvm-project] d20b01: [COFF] [CodeView] Add a few new enum values

jeremyd2019 via All-commits all-commits at lists.llvm.org
Wed Jul 7 12:01:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d20b013b490e0603ba21b5ccff966d7e11025775
      https://github.com/llvm/llvm-project/commit/d20b013b490e0603ba21b5ccff966d7e11025775
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-07-07 (Wed, 07 Jul 2021)

  Changed paths:
    M llvm/include/llvm/BinaryFormat/COFF.h
    M llvm/include/llvm/DebugInfo/CodeView/CodeView.h
    M llvm/lib/DebugInfo/CodeView/EnumTables.cpp
    M llvm/lib/ObjectYAML/COFFYAML.cpp

  Log Message:
  -----------
  [COFF] [CodeView] Add a few new enum values

These are undocumented, but are visible in the SDK headers since some
versions ago.

Differential Revision: https://reviews.llvm.org/D105513


  Commit: 7a7da69fbe288de088bfee47d2f7c21da2132085
      https://github.com/llvm/llvm-project/commit/7a7da69fbe288de088bfee47d2f7c21da2132085
  Author: Jeremy Drake <github at jdrake.com>
  Date:   2021-07-07 (Wed, 07 Jul 2021)

  Changed paths:
    M lld/COFF/Driver.cpp

  Log Message:
  -----------
  [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


Compare: https://github.com/llvm/llvm-project/compare/6a06dbafa14e...7a7da69fbe28


More information about the All-commits mailing list