Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Define all CMake configuration features in the same location #115361

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

ldionne
Copy link
Member

@ldionne ldionne commented Nov 7, 2024

This moves the configuration of the CMake features to turn off RTTI, exceptions and friends to the beginning of the CMake file, where we configure other optional parts of the library.

This fixes an important bug where we would disable the benchmarks because these options were not defined yet, leading to the build thinking they were defined to OFF.

@ldionne ldionne requested a review from a team as a code owner November 7, 2024 19:06
@llvmbot llvmbot added the libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. label Nov 7, 2024
@llvmbot
Copy link
Member

llvmbot commented Nov 7, 2024

@llvm/pr-subscribers-libcxx

Author: Louis Dionne (ldionne)

Changes

This moves the configuration of the CMake features to turn off RTTI, exceptions and friends to the beginning of the CMake file, where we configure other optional parts of the library.

This fixes an important bug where we would disable the benchmarks because these options were not defined yet, leading to the build thinking they were defined to OFF.


Full diff: https://github.com/llvm/llvm-project/pull/115361.diff

1 Files Affected:

  • (modified) libcxx/CMakeLists.txt (+8-8)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index d699135774ee0b..abe12c2805a7cf 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -47,6 +47,10 @@ include(HandleCompilerRT)
 # Basic options ---------------------------------------------------------------
 option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON)
 option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON)
+option(LIBCXX_ENABLE_EXCEPTIONS "Enable exceptions in the built library." ON)
+option(LIBCXX_ENABLE_RTTI
+  "Use runtime type information.
+  This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF." ON)
 option(LIBCXX_ENABLE_FILESYSTEM
   "Whether to include support for parts of the library that rely on a filesystem being
    available on the platform. This includes things like most parts of <filesystem> and
@@ -97,6 +101,10 @@ option(LIBCXX_ENABLE_WIDE_CHARACTERS
    support the C functionality for wide characters. When wide characters are
    not supported, several parts of the library will be disabled, notably the
    wide character specializations of std::basic_string." ON)
+option(LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON)
+option(LIBCXX_ENABLE_MONOTONIC_CLOCK
+  "Build libc++ with support for a monotonic clock.
+  This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
 
 # To use time zone support in libc++ the platform needs to have the IANA
 # database installed. Libc++ will fail to build if this is enabled on a
@@ -284,14 +292,6 @@ if (LIBCXX_BUILD_32_BITS)
 endif()
 
 # Feature options -------------------------------------------------------------
-option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON)
-option(LIBCXX_ENABLE_RTTI
-  "Use runtime type information.
-   This option may only be set to OFF when LIBCXX_ENABLE_EXCEPTIONS=OFF." ON)
-option(LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON)
-option(LIBCXX_ENABLE_MONOTONIC_CLOCK
-  "Build libc++ with support for a monotonic clock.
-   This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON)
 option(LIBCXX_HAS_MUSL_LIBC "Build libc++ with support for the Musl C library" OFF)
 option(LIBCXX_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF)
 option(LIBCXX_HAS_WIN32_THREAD_API "Ignore auto-detection and force use of win32 thread API" OFF)

This moves the configuration of the CMake features to turn off
RTTI, exceptions and friends to the beginning of the CMake file,
where we configure other optional parts of the library.

This fixes an important bug where we would disable the benchmarks
because these options were not defined yet, leading to the build
thinking they were defined to OFF.
@ldionne ldionne force-pushed the review/fix-skipping-benchmarks branch from 1e15e50 to 0f10a25 Compare November 11, 2024 17:17
@ldionne ldionne merged commit e589496 into llvm:main Nov 14, 2024
59 of 62 checks passed
@ldionne ldionne deleted the review/fix-skipping-benchmarks branch November 14, 2024 12:06
@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-win-x-aarch64 running on as-builder-2 while building libcxx at step 15 "test-check-cxx-aarch64-unknown-linux-gnu".

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

Here is the relevant piece of the build log for the reference
Step 15 (test-check-cxx-aarch64-unknown-linux-gnu) failure: Test just built components: check-cxx-aarch64-unknown-linux-gnu completed (failure)
...
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/libunwind.modulemap
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/mach-o/compact_unwind_encoding.h
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/unwind_arm_ehabi.h
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/unwind_itanium.h
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/include/unwind.h
-- Install configuration: "Release"
-- Installing: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test-suite-install/lib/aarch64-unknown-linux-gnu/libunwind.a
0.204 [6/2/5]No update step for 'google-benchmark'
0.261 [5/2/6]No patch step for 'google-benchmark'
1.234 [4/2/7]Performing configure step for 'google-benchmark'
FAILED: libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure 
cmd.exe /C "cd /D C:\buildbot\as-builder-2\x-aarch64\build\runtimes\runtimes-aarch64-unknown-linux-gnu-bins\libcxx\test\benchmarks\google-benchmark\src\google-benchmark-build && "C:\Program Files\CMake\bin\cmake.exe" -GNinja -CC:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake C:/buildbot/as-builder-2/x-aarch64/llvm-project/runtimes/../third-party/benchmark && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure"
loading initial cache file C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake
CMake Warning (dev) at C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake:9:
  Syntax Warning in cmake code at column 31

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is Clang 20.0.0
-- Detecting CXX compiler ABI info
CMake Warning in C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ne1g41/CMakeLists.txt:
  The object file directory

    C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ne1g41/CMakeFiles/cmTC_56b88.dir/./

  has 227 characters.  The maximum full path to an object file is 250
  characters (see CMAKE_OBJECT_PATH_MAX).  Object file

    CMakeCXXCompilerABI.cpp.obj

  cannot be safely placed under this directory.  The build may not work
  correctly.


-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/buildbot/as-builder-2/x-aarch64/build/./bin/clang++.exe
-- Check for working CXX compiler: C:/buildbot/as-builder-2/x-aarch64/build/./bin/clang++.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.25/Modules/CMakeTestCXXCompiler.cmake:63 (message):
  The C++ compiler

    "C:/buildbot/as-builder-2/x-aarch64/build/./bin/clang++.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/buildbot/as-builder-2/x-aarch64/build/runtimes/runtimes-aarch64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-l7xuf8
    

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-x86_64-linux-bootstrap-asan running on sanitizer-buildbot1 while building libcxx at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 87152 of 87153 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: MachO/reproduce-thin-archive-objc.s (86793 of 87152)
******************** TEST 'lld :: MachO/reproduce-thin-archive-objc.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 7: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp && mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
RUN: at line 8: sed s/SYM/_main/   /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
+ sed s/SYM/_main/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
RUN: at line 9: sed s/SYM/_unused/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
+ sed s/SYM/_unused/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
RUN: at line 11: llvm-ar rcsT unused.a unused.o; rm unused.o
+ llvm-ar rcsT unused.a unused.o
+ rm unused.o
RUN: at line 14: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/main.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/unused.a -ObjC -o /dev/null 2>&1                       | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s --check-prefix=WARN
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/main.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/unused.a -ObjC -o /dev/null
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s --check-prefix=WARN
RUN: at line 17: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings main.o unused.a -ObjC --no-warn-thin-archive-missing-members 2>&1 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/count 0
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/count 0
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings main.o unused.a -ObjC --no-warn-thin-archive-missing-members
Expected 0 lines, got 1.

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
261.05s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
140.81s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
133.50s: Clang :: Driver/fsanitize.c
105.03s: Clang :: Driver/arm-cortex-cpus-1.c
104.82s: Clang :: Driver/arm-cortex-cpus-2.c
89.55s: Clang :: OpenMP/target_update_codegen.cpp
Step 10 (stage2/asan check) failure: stage2/asan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 87152 of 87153 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90..
FAIL: lld :: MachO/reproduce-thin-archive-objc.s (86793 of 87152)
******************** TEST 'lld :: MachO/reproduce-thin-archive-objc.s' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 7: rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp && mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp && cd /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ rm -rf /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ mkdir /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
+ cd /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp
RUN: at line 8: sed s/SYM/_main/   /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
+ sed s/SYM/_main/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o main.o
RUN: at line 9: sed s/SYM/_unused/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
+ sed s/SYM/_unused/ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/llvm-mc -filetype=obj -triple=x86_64-apple-macos -o unused.o
RUN: at line 11: llvm-ar rcsT unused.a unused.o; rm unused.o
+ llvm-ar rcsT unused.a unused.o
+ rm unused.o
RUN: at line 14: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/main.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/unused.a -ObjC -o /dev/null 2>&1                       | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s --check-prefix=WARN
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/main.o /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/tools/lld/test/MachO/Output/reproduce-thin-archive-objc.s.tmp/unused.a -ObjC -o /dev/null
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/FileCheck /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/reproduce-thin-archive-objc.s --check-prefix=WARN
RUN: at line 17: ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings main.o unused.a -ObjC --no-warn-thin-archive-missing-members 2>&1 | /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/count 0
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/count 0
+ ld64.lld -arch x86_64 -platform_version macos 11.0 11.0 -syslibroot /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/lld/test/MachO/Inputs/MacOSX.sdk -lSystem -fatal_warnings main.o unused.a -ObjC --no-warn-thin-archive-missing-members
Expected 0 lines, got 1.

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
261.05s: LLVM :: CodeGen/AMDGPU/sched-group-barrier-pipeline-solver.mir
140.81s: Clang :: OpenMP/target_defaultmap_codegen_01.cpp
133.50s: Clang :: Driver/fsanitize.c
105.03s: Clang :: Driver/arm-cortex-cpus-1.c
104.82s: Clang :: Driver/arm-cortex-cpus-2.c
89.55s: Clang :: OpenMP/target_update_codegen.cpp

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-win-x-armv7l running on as-builder-1 while building libcxx at step 15 "test-check-cxx-armv7-unknown-linux-gnueabihf".

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

Here is the relevant piece of the build log for the reference
Step 15 (test-check-cxx-armv7-unknown-linux-gnueabihf) failure: Test just built components: check-cxx-armv7-unknown-linux-gnueabihf completed (failure)
...
-- Installing: C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install/lib/armv7-unknown-linux-gnueabihf/libunwind.a
0.154 [6/3/4]cmd.exe /C "cd /D C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\libcxx\test && "C:\Program Files\CMake\bin\cmake.exe" -E make_directory C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install && "C:\Program Files\CMake\bin\cmake.exe" -DCMAKE_INSTALL_COMPONENT=cxxabi-headers -DCMAKE_INSTALL_PREFIX="C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install" -P C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/cmake_install.cmake && "C:\Program Files\CMake\bin\cmake.exe" -DCMAKE_INSTALL_COMPONENT=cxxabi -DCMAKE_INSTALL_PREFIX="C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install" -P C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/cmake_install.cmake"
-- Install configuration: "Release"
-- Installing: C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install/include/c++/v1/__cxxabi_config.h
-- Installing: C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install/include/c++/v1/cxxabi.h
-- Install configuration: "Release"
-- Installing: C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test-suite-install/lib/armv7-unknown-linux-gnueabihf/libc++abi.a
0.176 [6/2/5]No update step for 'google-benchmark'
0.226 [5/2/6]No patch step for 'google-benchmark'
0.997 [4/2/7]Performing configure step for 'google-benchmark'
FAILED: libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure 
cmd.exe /C "cd /D C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\libcxx\test\benchmarks\google-benchmark\src\google-benchmark-build && "C:\Program Files\CMake\bin\cmake.exe" -GNinja -CC:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake C:/buildbot/as-builder-1/x-armv7l/llvm-project/runtimes/../third-party/benchmark && "C:\Program Files\CMake\bin\cmake.exe" -E touch C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure"
loading initial cache file C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake
CMake Warning (dev) at C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-Release.cmake:9:
  Syntax Warning in cmake code at column 31

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The CXX compiler identification is Clang 20.0.0
-- Detecting CXX compiler ABI info
CMake Warning in C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ah7uu3/CMakeLists.txt:
  The object file directory

    C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ah7uu3/CMakeFiles/cmTC_a8bbe.dir/./

  has 230 characters.  The maximum full path to an object file is 250
  characters (see CMAKE_OBJECT_PATH_MAX).  Object file

    CMakeCXXCompilerABI.cpp.obj

  cannot be safely placed under this directory.  The build may not work
  correctly.


-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: C:/buildbot/as-builder-1/x-armv7l/build/./bin/clang++.exe
CMake Warning in C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ye5213/CMakeLists.txt:
  The object file directory

    C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build/CMakeFiles/CMakeScratch/TryCompile-ye5213/CMakeFiles/cmTC_ab05b.dir/./

  has 230 characters.  The maximum full path to an object file is 250
  characters (see CMAKE_OBJECT_PATH_MAX).  Object file

    testCXXCompiler.cxx.obj

  cannot be safely placed under this directory.  The build may not work
  correctly.

@ldionne
Copy link
Member Author

ldionne commented Nov 14, 2024

@vitalybuka Do you know who owns the sanitizer-x86_64-linux-bootstrap-asan bot & friends? I see them fail on a very large number of our patches for reasons unrelated to libc++, which causes spurious notifications on the PRs.

@ldionne
Copy link
Member Author

ldionne commented Nov 14, 2024

@vvereschaka Sorry for breaking your windows bot, that failure seems legitimate. It looks like we're now trying to build the benchmarks (on Windows) but we weren't previously. I suspect this is because building GoogleBenchmark won't work in a windows-cross-linux configuration, I imagine you have flags that make it unhappy. IMO the way to go here might be (sadly) to use LIBCXX_INCLUDE_BENCHMARKS=OFF in your CMake cache to restore the previous behavior (which was that benchmarks were not being run).

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 14, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-hwasan running on sanitizer-buildbot12 while building libcxx at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{cxx} substitution: '/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{flags} substitution: '-pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{compile_flags} substitution: '-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{link_flags} substitution: '-lc++experimental -nostdlib++ -L %{lib-dir} -Wl,-rpath,%{lib-dir} -lc++ -latomic'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{benchmark_flags} substitution: '-I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{exec} substitution: '%{executor} --execdir %T -- '
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) All available features: -faligned-allocation, -fsized-deallocation, add-latomic-workaround, buildhost=linux, c++26, c++experimental, can-create-symlinks, clang, clang-20, clang-20.0, clang-20.0.0, diagnose-if-support, enable-benchmarks=dry-run, gcc-style-warnings, glibc-old-ru_RU-decimal-point, has-1024-bit-atomics, has-64-bit-atomics, has-fblocks, has-fconstexpr-steps, has-unix-headers, hwasan, large_tests, libcpp-abi-version=1, libcpp-hardening-mode=none, libcpp-has-no-availability-markup, libcpp-has-thread-api-pthread, linux, lsan, objective-c++, optimization=none, sanitizer-new-delete, stdlib=libc++, stdlib=llvm-libc++, target=aarch64-unknown-linux-gnu, thread-safety, verify-support
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1500 seconds was requested on the command line. Forcing timeout to be 1500 seconds.
-- Testing: 9909 of 9929 tests, 48 workers --
Testing:  0.. 
FAIL: llvm-libc++-shared.cfg.in :: benchmarks/formatted_size.bench.cpp (1036 of 9909)
******************** TEST 'llvm-libc++-shared.cfg.in :: benchmarks/formatted_size.bench.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# COMPILED WITH
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings  -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe
# .---command stderr------------
# | clang-20: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:168: reference llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, true, false, void, false, void>, false, true>::operator*() const [OptionsT = llvm::ilist_detail::node_options<llvm::MachineBasicBlock, true, false, void, false, void>, IsReverse = false, IsConst = true]: Assertion `!NodePtr->isKnownSentinel()' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
# | Stack dump:
# | 0.	Program arguments: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20 -cc1 -triple aarch64-unknown-linux-gnu -emit-obj -dumpdir /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe- -disable-free -clear-ast-before-backend -main-file-name formatted_size.bench.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -target-abi aapcs -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks -fcoverage-compilation-dir=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks -nostdinc++ -resource-dir /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D _LIBCPP_ENABLE_EXPERIMENTAL -D _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include -internal-externc-isystem /usr/include/aarch64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Werror=thread-safety -Wuser-defined-warnings -std=c++26 -fdeprecated-macro -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fsanitize=hwaddress -fsanitize-system-ignorelist=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20/share/hwasan_ignorelist.txt -fno-sanitize-memory-param-retval -fno-sanitize-address-use-odr-indicator -default-function-attr hwasan-abi=interceptor -target-feature +tagged-globals -target-feature +outline-atomics -target-feature -fmv -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/lit-tmp-n_7kdq5t/formatted_size-78335e.o -x c++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp
# | 1.	<eof> parser at end of file
# | 2.	Code generation
# | 3.	Running pass 'Function Pass Manager' on module '/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp'.
# | 4.	Running pass 'AArch64 Assembly Printer' on function '@_ZNSt3__120__libcpp_unreachableB8ne200000Ev'
# |  #0 0x0000c67f727c8740 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x8158740)
# |  #1 0x0000c67f727c65e8 llvm::sys::RunSignalHandlers() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x81565e8)
# |  #2 0x0000c67f727c8e50 SignalHandler(int) Signals.cpp:0:0
# |  #3 0x0000f42d37f588f8 (linux-vdso.so.1+0x8f8)
# |  #4 0x0000f42d378c7628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #5 0x0000f42d3787cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #6 0x0000f42d37867e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #7 0x0000f42d37875cbc (/lib/aarch64-linux-gnu/libc.so.6+0x35cbc)
# |  #8 0x0000f42d37875d2c (/lib/aarch64-linux-gnu/libc.so.6+0x35d2c)
# |  #9 0x0000c67f73759068 llvm::DwarfDebug::emitInitialLocDirective(llvm::MachineFunction const&, unsigned int) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90e9068)
# | #10 0x0000c67f7375a768 llvm::DwarfDebug::beginFunctionImpl(llvm::MachineFunction const*) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90ea768)
# | #11 0x0000c67f73720c54 llvm::AsmPrinter::emitFunctionHeader() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90b0c54)
# | #12 0x0000c67f73723810 llvm::AsmPrinter::emitFunctionBody() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90b3810)
# | #13 0x0000c67f7017e8c0 (anonymous namespace)::AArch64AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) AArch64AsmPrinter.cpp:0:0
# | #14 0x0000c67f71ca6b50 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7636b50)
# | #15 0x0000c67f721c8ba8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b58ba8)
# | #16 0x0000c67f721d0848 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b60848)
# | #17 0x0000c67f721c9588 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b59588)
# | #18 0x0000c67f72f88bec clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x8918bec)
# | #19 0x0000c67f72faa830 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x893a830)
# | #20 0x0000c67f74cf6e68 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0xa686e68)
Step 11 (stage2/hwasan check-cxx) failure: stage2/hwasan check-cxx (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{cxx} substitution: '/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{flags} substitution: '-pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{compile_flags} substitution: '-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{link_flags} substitution: '-lc++experimental -nostdlib++ -L %{lib-dir} -Wl,-rpath,%{lib-dir} -lc++ -latomic'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{benchmark_flags} substitution: '-I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{exec} substitution: '%{executor} --execdir %T -- '
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) All available features: -faligned-allocation, -fsized-deallocation, add-latomic-workaround, buildhost=linux, c++26, c++experimental, can-create-symlinks, clang, clang-20, clang-20.0, clang-20.0.0, diagnose-if-support, enable-benchmarks=dry-run, gcc-style-warnings, glibc-old-ru_RU-decimal-point, has-1024-bit-atomics, has-64-bit-atomics, has-fblocks, has-fconstexpr-steps, has-unix-headers, hwasan, large_tests, libcpp-abi-version=1, libcpp-hardening-mode=none, libcpp-has-no-availability-markup, libcpp-has-thread-api-pthread, linux, lsan, objective-c++, optimization=none, sanitizer-new-delete, stdlib=libc++, stdlib=llvm-libc++, target=aarch64-unknown-linux-gnu, thread-safety, verify-support
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1500 seconds was requested on the command line. Forcing timeout to be 1500 seconds.
-- Testing: 9909 of 9929 tests, 48 workers --
Testing:  0.. 
FAIL: llvm-libc++-shared.cfg.in :: benchmarks/formatted_size.bench.cpp (1036 of 9909)
******************** TEST 'llvm-libc++-shared.cfg.in :: benchmarks/formatted_size.bench.cpp' FAILED ********************
Exit Code: 1

Command Output (stdout):
--
# COMPILED WITH
/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings  -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=hwaddress -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe
# .---command stderr------------
# | clang-20: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/llvm/include/llvm/ADT/ilist_iterator.h:168: reference llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::MachineBasicBlock, true, false, void, false, void>, false, true>::operator*() const [OptionsT = llvm::ilist_detail::node_options<llvm::MachineBasicBlock, true, false, void, false, void>, IsReverse = false, IsConst = true]: Assertion `!NodePtr->isKnownSentinel()' failed.
# | PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
# | Stack dump:
# | 0.	Program arguments: /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20 -cc1 -triple aarch64-unknown-linux-gnu -emit-obj -dumpdir /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/Output/formatted_size.bench.cpp.dir/t.tmp.exe- -disable-free -clear-ast-before-backend -main-file-name formatted_size.bench.cpp -mrelocation-model pic -pic-level 2 -pic-is-pie -mframe-pointer=non-leaf -fmath-errno -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu generic -target-feature +v8a -target-feature +fp-armv8 -target-feature +neon -target-abi aapcs -debug-info-kind=constructor -dwarf-version=5 -debugger-tuning=gdb -fdebug-compilation-dir=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks -fcoverage-compilation-dir=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks -nostdinc++ -resource-dir /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/support -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D _LIBCPP_ENABLE_EXPERIMENTAL -D _LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -I /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/libcxx_build_hwasan/libcxx/test/benchmarks/google-benchmark/include -internal-isystem /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20/include -internal-isystem /usr/local/include -internal-isystem /usr/lib/gcc/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/include -internal-externc-isystem /usr/include/aarch64-linux-gnu -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -Werror=thread-safety -Wuser-defined-warnings -std=c++26 -fdeprecated-macro -ferror-limit 19 -pthread -fno-signed-char -fgnuc-version=4.2.1 -fno-implicit-modules -fskip-odr-check-in-gmf -fcxx-exceptions -fexceptions -fsanitize=hwaddress -fsanitize-system-ignorelist=/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/lib/clang/20/share/hwasan_ignorelist.txt -fno-sanitize-memory-param-retval -fno-sanitize-address-use-odr-indicator -default-function-attr hwasan-abi=interceptor -target-feature +tagged-globals -target-feature +outline-atomics -target-feature -fmv -faddrsig -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /tmp/lit-tmp-n_7kdq5t/formatted_size-78335e.o -x c++ /home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp
# | 1.	<eof> parser at end of file
# | 2.	Code generation
# | 3.	Running pass 'Function Pass Manager' on module '/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm-project/libcxx/test/benchmarks/formatted_size.bench.cpp'.
# | 4.	Running pass 'AArch64 Assembly Printer' on function '@_ZNSt3__120__libcpp_unreachableB8ne200000Ev'
# |  #0 0x0000c67f727c8740 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x8158740)
# |  #1 0x0000c67f727c65e8 llvm::sys::RunSignalHandlers() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x81565e8)
# |  #2 0x0000c67f727c8e50 SignalHandler(int) Signals.cpp:0:0
# |  #3 0x0000f42d37f588f8 (linux-vdso.so.1+0x8f8)
# |  #4 0x0000f42d378c7628 (/lib/aarch64-linux-gnu/libc.so.6+0x87628)
# |  #5 0x0000f42d3787cb3c raise (/lib/aarch64-linux-gnu/libc.so.6+0x3cb3c)
# |  #6 0x0000f42d37867e00 abort (/lib/aarch64-linux-gnu/libc.so.6+0x27e00)
# |  #7 0x0000f42d37875cbc (/lib/aarch64-linux-gnu/libc.so.6+0x35cbc)
# |  #8 0x0000f42d37875d2c (/lib/aarch64-linux-gnu/libc.so.6+0x35d2c)
# |  #9 0x0000c67f73759068 llvm::DwarfDebug::emitInitialLocDirective(llvm::MachineFunction const&, unsigned int) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90e9068)
# | #10 0x0000c67f7375a768 llvm::DwarfDebug::beginFunctionImpl(llvm::MachineFunction const*) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90ea768)
# | #11 0x0000c67f73720c54 llvm::AsmPrinter::emitFunctionHeader() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90b0c54)
# | #12 0x0000c67f73723810 llvm::AsmPrinter::emitFunctionBody() (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x90b3810)
# | #13 0x0000c67f7017e8c0 (anonymous namespace)::AArch64AsmPrinter::runOnMachineFunction(llvm::MachineFunction&) AArch64AsmPrinter.cpp:0:0
# | #14 0x0000c67f71ca6b50 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7636b50)
# | #15 0x0000c67f721c8ba8 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b58ba8)
# | #16 0x0000c67f721d0848 llvm::FPPassManager::runOnModule(llvm::Module&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b60848)
# | #17 0x0000c67f721c9588 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x7b59588)
# | #18 0x0000c67f72f88bec clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x8918bec)
# | #19 0x0000c67f72faa830 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0x893a830)
# | #20 0x0000c67f74cf6e68 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-aarch64-linux-bootstrap-hwasan/build/llvm_build0/bin/clang-20+0xa686e68)

@Caslyn
Copy link
Contributor

Caslyn commented Nov 15, 2024

Hey @ldionne - possibly related to #115361 (comment), we're also seeing this error propagate on our clang-linux-arm64/clang-linux-x64 down stream builders as well[0]. It sounds like this change possibly triggered something that was broken with how google-benchmark is configured:

[12/257](61) No download step for 'google-benchmark'
[13/257](61) No update step for 'google-benchmark'
[14/257](61) No patch step for 'google-benchmark'
[15/257](61) Generating Sanitizer-x86_64-Test-Nolibc
[16/257](61) Performing configure step for 'google-benchmark'
FAILED: libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure 
cd /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build && /b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/cmake/72c014f0086372a2bab7ed771e2ed942d6122d94331d19c95566bb25d2f962ff/bin/cmake -GNinja -C/b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-RelWithDebInfo.cmake -S /b/s/w/ir/x/w/llvm-llvm-project/runtimes/../third-party/benchmark -B /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-build && /b/s/w/ir/x/w/cipd_tool/fuchsia/third_party/cmake/72c014f0086372a2bab7ed771e2ed942d6122d94331d19c95566bb25d2f962ff/bin/cmake -E touch /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/src/google-benchmark-stamp/google-benchmark-configure
loading initial cache file /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-RelWithDebInfo.cmake
CMake Warning (dev) at /b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-linux-gnu-bins/libcxx/test/benchmarks/google-benchmark/tmp/google-benchmark-cache-RelWithDebInfo.cmake:9:
  Syntax Warning in cmake code at column 31

  Argument not separated from preceding token by whitespace.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!

[0] https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8731292516413316561/overview

@vvereschaka
Copy link
Contributor

vvereschaka commented Nov 15, 2024

IMO the way to go here might be (sadly) to use LIBCXX_INCLUDE_BENCHMARKS=OFF in your CMake cache to restore the previous behavior (which was that benchmarks were not being run).

@ldionne thank you for letting me know. I'll test the build configuration with LIBCXX_INCLUDE_BENCHMARKS=OFF and update the CMake cache file (or the buildbot configuration) accordingly.

UPDATE: unfortunately passing LIBCXX_INCLUDE_BENCHMARKS=OFF to CMake configuration does not fix the problem.

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 16, 2024

LLVM Buildbot has detected a new failure on builder sanitizer-aarch64-linux-bootstrap-ubsan running on sanitizer-buildbot9 while building libcxx at step 2 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 2 (annotate) failure: 'python ../sanitizer_buildbot/sanitizers/zorg/buildbot/builders/sanitizers/buildbot_selector.py' (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{flags} substitution: '-pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{compile_flags} substitution: '-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{link_flags} substitution: '-lc++experimental -nostdlib++ -L %{lib-dir} -Wl,-rpath,%{lib-dir} -lc++ -latomic'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{benchmark_flags} substitution: '-I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{exec} substitution: '%{executor} --execdir %T -- '
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) All available features: -faligned-allocation, -fsized-deallocation, add-latomic-workaround, buildhost=linux, c++26, c++experimental, can-create-symlinks, clang, clang-20, clang-20.0, clang-20.0.0, diagnose-if-support, enable-benchmarks=dry-run, gcc-style-warnings, glibc-old-ru_RU-decimal-point, has-1024-bit-atomics, has-64-bit-atomics, has-fblocks, has-fconstexpr-steps, has-unix-headers, large_tests, libcpp-abi-version=1, libcpp-hardening-mode=none, libcpp-has-no-availability-markup, libcpp-has-thread-api-pthread, linux, objective-c++, optimization=none, stdlib=libc++, stdlib=llvm-libc++, target=aarch64-unknown-linux-gnu, thread-safety, ubsan, verify-support
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1500 seconds was requested on the command line. Forcing timeout to be 1500 seconds.
-- Testing: 9909 of 9929 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40
TIMEOUT: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp (4273 of 9909)
******************** TEST 'llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp' FAILED ********************
Exit Code: -9
Timeout: Reached timeout of 1500 seconds

Command Output (stdout):
--
# COMPILED WITH
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/benchmarks/variant_visit_3.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings  -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/Output/variant_visit_3.bench.cpp.dir/t.tmp.exe
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/benchmarks/variant_visit_3.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/Output/variant_visit_3.bench.cpp.dir/t.tmp.exe
# note: command had no output on stdout or stderr
# error: command failed with exit status: -9
# error: command reached timeout: True

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
1501.14s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp
1441.91s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_copy.pass.cpp
1371.33s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_1.bench.cpp
1289.52s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_2.bench.cpp
1028.18s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
949.20s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
938.19s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp
936.73s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp
895.42s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_assignment.pass.cpp
883.31s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_unary.pass.cpp
699.78s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
695.40s: llvm-libc++-shared.cfg.in :: benchmarks/formatter_float.bench.cpp
675.65s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/ranges_set_symmetric_difference.pass.cpp
664.66s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
657.09s: llvm-libc++-shared.cfg.in :: std/depr/depr.c.headers/math_h.pass.cpp
630.91s: llvm-libc++-shared.cfg.in :: std/atomics/atomics.ref/compare_exchange_weak.pass.cpp
599.50s: llvm-libc++-shared.cfg.in :: std/atomics/atomics.ref/compare_exchange_strong.pass.cpp
586.47s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_ctor_load.pass.cpp
585.90s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.nonmodifying/alg.ends_with/ranges.ends_with.pass.cpp
526.46s: llvm-libc++-shared.cfg.in :: std/containers/container.adaptors/container.adaptors.format/format.functions.vformat.pass.cpp
Step 11 (stage2/ubsan check-cxx) failure: stage2/ubsan check-cxx (failure)
...
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{flags} substitution: '-pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{compile_flags} substitution: '-nostdinc++ -I %{target-include-dir} -I %{include-dir} -I %{libcxx-dir}/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{link_flags} substitution: '-lc++experimental -nostdlib++ -L %{lib-dir} -Wl,-rpath,%{lib-dir} -lc++ -latomic'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{benchmark_flags} substitution: '-I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark'
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) Using %{exec} substitution: '%{executor} --execdir %T -- '
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/utils/libcxx/test/config.py:24: note: (llvm-libc++-shared.cfg.in) All available features: -faligned-allocation, -fsized-deallocation, add-latomic-workaround, buildhost=linux, c++26, c++experimental, can-create-symlinks, clang, clang-20, clang-20.0, clang-20.0.0, diagnose-if-support, enable-benchmarks=dry-run, gcc-style-warnings, glibc-old-ru_RU-decimal-point, has-1024-bit-atomics, has-64-bit-atomics, has-fblocks, has-fconstexpr-steps, has-unix-headers, large_tests, libcpp-abi-version=1, libcpp-hardening-mode=none, libcpp-has-no-availability-markup, libcpp-has-thread-api-pthread, linux, objective-c++, optimization=none, stdlib=libc++, stdlib=llvm-libc++, target=aarch64-unknown-linux-gnu, thread-safety, ubsan, verify-support
llvm-lit: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/main.py:72: note: The test suite configuration requested an individual test timeout of 0 seconds but a timeout of 1500 seconds was requested on the command line. Forcing timeout to be 1500 seconds.
-- Testing: 9909 of 9929 tests, 48 workers --
Testing:  0.. 10.. 20.. 30.. 40
TIMEOUT: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp (4273 of 9909)
******************** TEST 'llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp' FAILED ********************
Exit Code: -9
Timeout: Reached timeout of 1500 seconds

Command Output (stdout):
--
# COMPILED WITH
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/benchmarks/variant_visit_3.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings  -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/Output/variant_visit_3.bench.cpp.dir/t.tmp.exe
# executed command: /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm_build0/bin/clang++ /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/benchmarks/variant_visit_3.bench.cpp -pthread --target=aarch64-unknown-linux-gnu -g -fno-omit-frame-pointer -fsanitize=undefined -fno-sanitize=float-divide-by-zero -fno-sanitize-recover=all -nostdinc++ -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/include/c++/v1 -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/libcxx/test/support -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -I /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/include -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/google-benchmark/lib -l benchmark -lc++experimental -nostdlib++ -L /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -Wl,-rpath,/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test-suite-install/lib -lc++ -latomic -o /home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/libcxx_build_ubsan/libcxx/test/benchmarks/Output/variant_visit_3.bench.cpp.dir/t.tmp.exe
# note: command had no output on stdout or stderr
# error: command failed with exit status: -9
# error: command reached timeout: True

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
Slowest Tests:
--------------------------------------------------------------------------
1501.14s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_3.bench.cpp
1441.91s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_copy.pass.cpp
1371.33s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_1.bench.cpp
1289.52s: llvm-libc++-shared.cfg.in :: benchmarks/variant_visit_2.bench.cpp
1028.18s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.range.pass.cpp
949.20s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.modifying.operations/alg.transform/ranges.transform.binary.iterator.pass.cpp
938.19s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_bitwise_operators.pass.cpp
936.73s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_arith_operators.pass.cpp
895.42s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.reference/reference_assignment.pass.cpp
883.31s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_unary.pass.cpp
699.78s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.union/ranges_set_union.pass.cpp
695.40s: llvm-libc++-shared.cfg.in :: benchmarks/formatter_float.bench.cpp
675.65s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.symmetric.difference/ranges_set_symmetric_difference.pass.cpp
664.66s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.sorting/alg.set.operations/set.intersection/ranges_set_intersection.pass.cpp
657.09s: llvm-libc++-shared.cfg.in :: std/depr/depr.c.headers/math_h.pass.cpp
630.91s: llvm-libc++-shared.cfg.in :: std/atomics/atomics.ref/compare_exchange_weak.pass.cpp
599.50s: llvm-libc++-shared.cfg.in :: std/atomics/atomics.ref/compare_exchange_strong.pass.cpp
586.47s: llvm-libc++-shared.cfg.in :: std/experimental/simd/simd.class/simd_ctor_load.pass.cpp
585.90s: llvm-libc++-shared.cfg.in :: std/algorithms/alg.nonmodifying/alg.ends_with/ranges.ends_with.pass.cpp
526.46s: llvm-libc++-shared.cfg.in :: std/containers/container.adaptors/container.adaptors.format/format.functions.vformat.pass.cpp

@ldionne
Copy link
Member Author

ldionne commented Nov 16, 2024

@Caslyn

It sounds like this change possibly triggered something that was broken with how google-benchmark is configured:

I am seeing this in your error message, which seems to be the problem:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

I guess just using ninja doesn't resolve to anything in your setup, so you'd need to set CMAKE_MAKE_PROGRAM to let CMake know where to use ninja from (e.g. xcrun --find ninja).

@vvereschaka

UPDATE: unfortunately passing LIBCXX_INCLUDE_BENCHMARKS=OFF to CMake configuration does not fix the problem.

Can you try doing a clean build? We definitely don't try to configure GoogleBenchmarks if LIBCXX_INCLUDE_BENCHMARKS is OFF:

if (LIBCXX_INCLUDE_BENCHMARKS)

Can you share more context around the failure you're still seeing?

petrhosek added a commit to petrhosek/llvm-project that referenced this pull request Nov 18, 2024
This addresses the issue uncovered by llvm#115361. Previously, we weren't
building benchmarks in many cases due to the following block:

https://github.com/llvm/llvm-project/blob/e58949632e91477af58d983f3b66369e6a2c8233/libcxx/CMakeLists.txt#L162-L172

We need to passthrough the necessary variables into the benchmarks
subbuild and use correct syntax.
@petrhosek
Copy link
Member

@Caslyn

It sounds like this change possibly triggered something that was broken with how google-benchmark is configured:

I am seeing this in your error message, which seems to be the problem:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

I guess just using ninja doesn't resolve to anything in your setup, so you'd need to set CMAKE_MAKE_PROGRAM to let CMake know where to use ninja from (e.g. xcrun --find ninja).

@ldionne #116644 should address the issue.

akshayrdeodhar pushed a commit to akshayrdeodhar/llvm-project that referenced this pull request Nov 18, 2024
…llvm#115361)

This moves the configuration of the CMake features to turn off RTTI,
exceptions and friends to the beginning of the CMake file, where we
configure other optional parts of the library.

This fixes an important bug where we would disable the benchmarks
because these options were not defined yet, leading to the build
thinking they were defined to OFF.
@vitalybuka
Copy link
Collaborator

vitalybuka commented Nov 18, 2024

@vitalybuka Do you know who owns the sanitizer-x86_64-linux-bootstrap-asan bot & friends? I see them fail on a very large number of our patches for reasons unrelated to libc++, which causes spurious notifications on the PRs.

Good point, they include more heavy steps which likely fail for reasons other than libc++.
We still want to check libc++ with sanitizers, as time to time it detect issues in libc++.

Solution is to extract libc++ into dedicated builder. llvm/llvm-zorg#310 for tracking.

@vitalybuka
Copy link
Collaborator

https://lab.llvm.org/buildbot/#/builders/55/builds/3560

However this one looks very relevant @ldionne

@vitalybuka
Copy link
Collaborator

@vitalybuka Do you know who owns the sanitizer-x86_64-linux-bootstrap-asan bot & friends? I see them fail on a very large number of our patches for reasons unrelated to libc++, which causes spurious notifications on the PRs.

Good point, they include more heavy steps which likely fail for reasons other than libc++. We still want to check libc++ with sanitizers, as time to time it detect issues in libc++.

Solution is to extract libc++ into dedicated builder. llvm/llvm-zorg#310 for tracking.

I was quick with judgement. It will not help.

They are just slow, but far from slowest bots on LLVM. Slow bots mean large blame list, more unrelated patches blamed with broken patch. I don't think that they are any how special.
Maybe there are 6 different builders with bootstrap in name, easier to remember that other slow bots. So it's a branding issue :)

Bots a very useful catching sanitizer related miscompilations early.
We will think what else can be done about blame list size. So far I have no good ideas.

@petrhosek
Copy link
Member

https://lab.llvm.org/buildbot/#/builders/55/builds/3560

However this one looks very relevant @ldionne

I think this is because we're now building and running benchmarks that we weren't building before due to:

if (WIN32 OR MINGW OR ANDROID OR ${CMAKE_SYSTEM_NAME} MATCHES "AIX"
OR NOT LIBCXX_ENABLE_LOCALIZATION
OR NOT LIBCXX_ENABLE_THREADS
OR NOT LIBCXX_ENABLE_FILESYSTEM
OR NOT LIBCXX_ENABLE_RANDOM_DEVICE
OR NOT LIBCXX_ENABLE_EXCEPTIONS
OR NOT LIBCXX_ENABLE_RTTI)
set(_include_benchmarks OFF)
else()
set(_include_benchmarks ON)
endif()

Those benchmarks run too slowly and timeout when built with instrumentation.

@vitalybuka
Copy link
Collaborator

https://lab.llvm.org/buildbot/#/builders/55/builds/3560

However this one looks very relevant @ldionne

I think this is because we're now building and running benchmarks that we weren't building before due to:

Thanks, there is obviously no point to do so with sanitizers.
I can disable them on bots with -DLIBCXX_INCLUDE_BENCHMARKS=OFF
Do we want to disable them automatically with -DLLVM_USE_SANITIZER?

vitalybuka added a commit to llvm/llvm-zorg that referenced this pull request Nov 19, 2024
petrhosek added a commit that referenced this pull request Nov 19, 2024
…6644)

This addresses the issue uncovered by #115361. Previously, we weren't
building benchmarks in many cases due to the following block:

https://github.com/llvm/llvm-project/blob/e58949632e91477af58d983f3b66369e6a2c8233/libcxx/CMakeLists.txt#L162-L172

We need to passthrough the necessary variables into the benchmarks
subbuild and use correct syntax.
swatheesh-mcw pushed a commit to swatheesh-mcw/llvm-project that referenced this pull request Nov 20, 2024
…m#116644)

This addresses the issue uncovered by llvm#115361. Previously, we weren't
building benchmarks in many cases due to the following block:

https://github.com/llvm/llvm-project/blob/e58949632e91477af58d983f3b66369e6a2c8233/libcxx/CMakeLists.txt#L162-L172

We need to passthrough the necessary variables into the benchmarks
subbuild and use correct syntax.
@vvereschaka
Copy link
Contributor

vvereschaka commented Nov 21, 2024

@ldionne ,

UPDATE: unfortunately passing LIBCXX_INCLUDE_BENCHMARKS=OFF to CMake configuration does not fix the problem.

Can you try doing a clean build? We definitely don't try to configure GoogleBenchmarks if LIBCXX_INCLUDE_BENCHMARKS is OFF:

sorry, it was my bad with some mistype during the quick check. LIBCXX_INCLUDE_BENCHMARKS=OFF works fine, the cross toolchain builders have been fixed and also work fine with these changes.

@ldionne
Copy link
Member Author

ldionne commented Nov 22, 2024

@petrhosek @vitalybuka FWIW I suspect that you folks are running the tests using lit directly, is that possible? If you were running ninja check-runtimes instead, I don't think you'd have these time out issues. Indeed, when called via ninja check-runtimes, we pass the additional argument --param enable_benchmarks=dry-run to lit, which doesn't run the full benchmarks but only compiles them.

@vitalybuka
Copy link
Collaborator

@petrhosek @vitalybuka FWIW I suspect that you folks are running the tests using lit directly, is that possible? If you were running ninja check-runtimes instead, I don't think you'd have these time out issues. Indeed, when called via ninja check-runtimes, we pass the additional argument --param enable_benchmarks=dry-run to lit, which doesn't run the full benchmarks but only compiles them.

Can't say for @petrhosek issues

But bootstrap bots run ninja check-cxxm you can see it from the log https://lab.llvm.org/buildbot/#/builders/55/builds/3560/steps/11/logs/stdio
And -DLIBCXX_INCLUDE_BENCHMARKS=OFF helped.

@petrhosek
Copy link
Member

We're using ninja check-runtimes-<triple>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants