<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/56618>56618</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Assert "On startup, a program is expected to be assigned only to one processor group!" fires on Windows Server 2022
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          wjschmidt
      </td>
    </tr>
</table>

<pre>
    This assert exists in llvm/lib/Support/Windows/Threading.inc.  As described at https://docs.microsoft.com/en-us/windows/win32/procthread/processor-groups, "Starting with Windows 11 and Windows Server 2022, it is no longer the case that applications are constrained by default to a single processor group. Instead, processes and their threads have processor affinities that by default span all processors in the system, across multiple groups on machines with more than 64 processors."  This means that a large number of lit tests fail on large systems running these operating systems.

On the system where I noticed this (running Windows Server 2022 with 160 logical processors), the following lit tests all fail.  If I comment out this assert, they all pass.

Failed Tests (89):
  Clang :: CodeGenCXX/profile-remap.cpp
  Clang :: Profile/c-counter-overflows.c
  LLVM :: LTO/Resolution/X86/dead-strip-fulllto.ll
  LLVM :: LTO/Resolution/X86/lto-unit-check.ll
  LLVM :: Transforms/PGOProfile/misexpect-branch.ll
  LLVM :: tools/llvm-cov/native_separators.c
  LLVM :: tools/llvm-profdata/overflow-instr.test
  LLVM-Unit :: Support/./SupportTests.exe/Parallel/ForEachError
  lld :: COFF/Intel_COFF/whole_program_alias_02.ll
  lld :: COFF/Intel_COFF/whole_program_alias_03.ll
  lld :: COFF/Intel_COFF/whole_program_read_2.ll
  lld :: COFF/Intel_COFF/whole_program_read_trace_6.ll
  lld :: COFF/autoimport-x86.s
  lld :: COFF/cgprofile-txt.s
  lld :: COFF/comdat-selection-associative-largest.s
  lld :: COFF/crt-dyn-initializer-order.test
  lld :: COFF/debug-dwarf.test
  lld :: COFF/def-export-cpp.s
  lld :: COFF/dll.test
  lld :: COFF/dllimport-gc.test
  lld :: COFF/duplicate-imp-func.s
  lld :: COFF/empty-subsection.s
  lld :: COFF/export-all.s
  lld :: COFF/export32.test
  lld :: COFF/force-multipleres.test
  lld :: COFF/gfids-gc.s
  lld :: COFF/icf-safe.s
  lld :: COFF/incremental.test
  lld :: COFF/lto-comdat.ll
  lld :: COFF/lto-new-pass-manager.ll
  lld :: COFF/merge-resource-manifest.test
  lld :: COFF/opt.test
  lld :: COFF/pdb-globals-dia-vfunc-simple.test
  lld :: COFF/pdb-none.test
  lld :: COFF/pdb-type-server-missing.yaml
  lld :: COFF/pdb-type-server-simple.test
  lld :: COFF/pdbaltpath.test
  lld :: COFF/pdbstripped.test
  lld :: COFF/precomp-link.test
  lld :: COFF/rsds.test
  lld :: COFF/start-lib.ll
  lld :: COFF/symtab.test
  lld :: COFF/tls-alignment-64.ll
  lld :: COFF/unwind.test
  lld :: COFF/winsysroot.test
  lld :: COFF/wrap-import.ll
  lld :: COFF/wrap.s
  lld :: ELF/Intel_ELF/comdat-linkonce.s
  lld :: ELF/Intel_ELF/intel_advanced_opt.ll
  lld :: ELF/Intel_ELF/whole_program_alias_03.ll
  lld :: ELF/Intel_ELF/whole_program_alias_05.ll
  lld :: ELF/Intel_ELF/whole_program_read_1.ll
  lld :: ELF/Intel_ELF/whole_program_read_trace_1.ll
  lld :: ELF/Intel_ELF/whole_program_read_trace_5.ll
  lld :: ELF/abs-conflict.s
  lld :: ELF/allow-multiple-definition.s
  lld :: ELF/cgprofile-rela.test
  lld :: ELF/gnu-hash-table-rwsegment.s
  lld :: ELF/gnu-ifunc-nonpreemptible.s
  lld :: ELF/gnu-ifunc-plt.s
  lld :: ELF/linkerscript/filename-spec.s
  lld :: ELF/linkerscript/input-relative.s
  lld :: ELF/linkerscript/linkerscript.s
  lld :: ELF/linkerscript/linkorder.s
  lld :: ELF/linkerscript/loadaddr.s
  lld :: ELF/linkerscript/memory-attr.test
  lld :: ELF/linkerscript/memory-err.s
  lld :: ELF/linkerscript/memory-gap-explicit-expr.test
  lld :: ELF/linkerscript/memory-ignored-dot-assign.test
  lld :: ELF/linkerscript/memory-include.test
  lld :: ELF/linkerscript/memory-loc-counter.test
  lld :: ELF/linkerscript/memory-nonalloc.test
  lld :: ELF/linkerscript/memory.s
  lld :: ELF/linkerscript/merge-output-sections.s
  lld :: ELF/linkerscript/no-space.s
  lld :: ELF/linkerscript/non-alloc-segment.s
  lld :: ELF/lto/cache.ll
  lld :: ELF/lto/devirt_vcall_vis_public.ll
  lld :: ELF/lto/emit-asm.ll
  lld :: ELF/lto/inline-asm.ll
  lld :: ELF/lto/internalize-basic.ll
  lld :: ELF/lto/parallel-internalize.ll
  lld :: ELF/lto/wrap-unreferenced-before-codegen.test
  lld :: ELF/no-soname.s
  lld :: ELF/oformat-binary-ttext.s
  lld :: ELF/partition-icf.s
  lld :: ELF/relocatable.s
  lld :: ELF/relocation-common.s
  lld :: ELF/version-script.s


</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJylWFtv27gS_jXOC0HDllM3efBDTrZdFOhBitPsnr4ZlDSSuEuRAknZ8f76_UaSc9nGkpMFAoeS5ps7Z4ZMXX7Y3Fc6CBUC-SjoQYcYhLbCmF09Sz4bneL3e9s0zkes_q9t7vYBq_vKk8q1LefaZnMhboLIKWRep5QLFUUVYxNmqxuQ4i93WZjXOvMuuCLOM8fMycqWWe0fmWK1SvC_8S6LnYDhgUJwXpbetWCa3IpZknyPykfIF3sdKzEoJpZLoWz--Pid_I68SBZJwjAdBYy1ThhnS7yPFYlMBcICKqumMTpTUTsLj3h8wiJ6pS1MSg-wr1CtiSI6oUSAaEPiUTnRKTcXXwDp9L49fqPQqQRZmiWyVUFUavccrIpCWx01aDtVnkkLjbJCGfNE3QWIVQ8HyKpZlGLPBlEDoBuo1XtKOCtqlVUwIPRuqp3vjLViffmM4Rz-FKLLhJqUHZRQwihfkrBtncJZrhAGDozEKVIobZh9T9ErEoRvreWQQDk41TXkVRei4ft8tvhltrjpf--e2yD2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