[clang] [llvm] [llvm][clang] Allocate a new stack instead of spawning a new thread to get more stack space (PR #133173)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 15 11:26:38 PDT 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ml-opt-dev-x86-64` running on `ml-opt-dev-x86-64-b2` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/16972

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
...
3.076 [116/26/614] Linking CXX executable unittests/Frontend/LLVMFrontendTests
3.130 [115/26/615] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/Host.cpp.o
3.189 [114/26/616] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/RISCVISAInfoTest.cpp.o
3.224 [113/26/617] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/RISCVTargetParserTest.cpp.o
4.356 [112/26/618] Linking CXX executable unittests/ExecutionEngine/Orc/OrcJITTests
4.415 [111/26/619] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/TargetParserTest.cpp.o
4.437 [110/26/620] Linking CXX executable unittests/Target/LoongArch/LoongArchTests
4.451 [109/26/621] Building CXX object unittests/TargetParser/CMakeFiles/TargetParserTests.dir/TripleTest.cpp.o
4.458 [108/26/622] Building CXX object unittests/Telemetry/CMakeFiles/TelemetryTests.dir/TelemetryTest.cpp.o
4.483 [107/26/623] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/ProgramStackTest.cpp.o
FAILED: unittests/Support/CMakeFiles/SupportTests.dir/ProgramStackTest.cpp.o 
ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_STATIC -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/ml-opt-dev-x86-64-b1/build/unittests/Support -I/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/Support -I/b/ml-opt-dev-x86-64-b1/build/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/third-party/unittest/googletest/include -I/b/ml-opt-dev-x86-64-b1/llvm-project/third-party/unittest/googlemock/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -Wno-dangling-else -Wno-variadic-macros -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -Wno-suggest-override -std=c++17 -MD -MT unittests/Support/CMakeFiles/SupportTests.dir/ProgramStackTest.cpp.o -MF unittests/Support/CMakeFiles/SupportTests.dir/ProgramStackTest.cpp.o.d -o unittests/Support/CMakeFiles/SupportTests.dir/ProgramStackTest.cpp.o -c /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/Support/ProgramStackTest.cpp
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/Support/ProgramStackTest.cpp: In member function ‘virtual void ProgramStackTest_runOnNewStack_Test::TestBody()’:
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/Support/ProgramStackTest.cpp:33:55: error: call of overloaded ‘runOnNewStack(int, llvm::function_ref<void(int&)>, int&)’ is ambiguous
   33 |   runOnNewStack(0, function_ref<void(int &)>(func2), A);
      |                                                       ^
In file included from /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/unittests/Support/ProgramStackTest.cpp:9:
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/Support/ProgramStack.h:48:3: note: candidate: ‘R llvm::runOnNewStack(unsigned int, llvm::function_ref<Ret(Params ...)>, Ts&& ...) [with R = void; Ts = {int&}]’
   48 | R runOnNewStack(unsigned StackSize, function_ref<R(Ts...)> Fn, Ts &&...Args) {
      |   ^~~~~~~~~~~~~
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/include/llvm/Support/ProgramStack.h:55:6: note: candidate: ‘void llvm::runOnNewStack(unsigned int, llvm::function_ref<void(Ts ...)>, Ts&& ...) [with Ts = {int&}]’
   55 | void runOnNewStack(unsigned StackSize, function_ref<void(Ts...)> Fn,
      |      ^~~~~~~~~~~~~
4.613 [107/25/624] Linking CXX executable unittests/Telemetry/TelemetryTests
4.661 [107/24/625] Linking CXX executable unittests/Target/VE/VETests
4.714 [107/23/626] Linking CXX executable unittests/TargetParser/TargetParserTests
4.805 [107/22/627] Linking CXX executable unittests/MC/AMDGPU/AMDGPUMCTests
4.844 [107/21/628] Linking CXX executable unittests/Target/ARM/ARMTests
4.857 [107/20/629] Linking CXX executable unittests/IR/IRTests
4.863 [107/19/630] Linking CXX executable unittests/Target/PowerPC/PowerPCTests
4.869 [107/18/631] Linking CXX executable unittests/Target/WebAssembly/WebAssemblyTests
4.869 [107/17/632] Linking CXX executable unittests/Passes/PassBuilderBindings/PassesBindingsTests
4.872 [107/16/633] Linking CXX executable unittests/Target/RISCV/RISCVTests
5.035 [107/15/634] Linking CXX executable unittests/Target/AArch64/AArch64Tests
5.036 [107/14/635] Linking CXX executable unittests/Target/SPIRV/SPIRVTests
5.190 [107/13/636] Linking CXX executable unittests/Analysis/AnalysisTests
5.263 [107/12/637] Building CXX object unittests/Support/CMakeFiles/SupportTests.dir/CrashRecoveryTest.cpp.o
5.322 [107/11/638] Linking CXX executable unittests/ExecutionEngine/MCJIT/MCJITTests
5.367 [107/10/639] Linking CXX executable unittests/Passes/Plugins/PluginsTests
5.988 [107/9/640] Linking CXX executable unittests/Target/AMDGPU/AMDGPUTests
6.500 [107/8/641] Linking CXX executable unittests/Target/X86/X86Tests
7.168 [107/7/642] Linking CXX executable unittests/CodeGen/GlobalISel/GlobalISelTests
7.185 [107/6/643] Linking CXX executable unittests/CodeGen/CodeGenTests
7.288 [107/5/644] Linking CXX executable unittests/MIR/MIRTests
7.395 [107/4/645] Linking CXX executable unittests/DebugInfo/DWARF/DebugInfoDWARFTests
7.497 [107/3/646] Linking CXX executable unittests/DebugInfo/LogicalView/DebugInfoLogicalViewTests
7.627 [107/2/647] Linking CXX executable unittests/MI/MITests
7.754 [107/1/648] Linking CXX executable unittests/Target/TargetMachineCTests
ninja: build stopped: subcommand failed.

```

</details>

https://github.com/llvm/llvm-project/pull/133173


More information about the llvm-commits mailing list