[clang] [llvm] [clang] [ubsan] add __has_feature for UBSan checks (PR #148310)
LLVM Continuous Integration via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 17:57:22 PDT 2025
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-sie-win` running on `sie-win-worker` while building `clang` at step 7 "test-build-unified-tree-check-all".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/46/builds/19969
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Lexer/has_feature_undefined_behavior_sanitizer.cpp' FAILED ********************
Exit Code: 2
Command Output (stdout):
--
# RUN: at line 1
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=undefined Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefix=CHECK-UBSAN Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=undefined 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefix=CHECK-UBSAN 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 2
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=alignment Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-ALIGNMENT Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=alignment 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-ALIGNMENT 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 3
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=bool Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-BOOL Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=bool 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-BOOL 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 4
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=builtin Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-BUILTIN Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=builtin 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-BUILTIN 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 5
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=array-bounds Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-ARRAY-BOUNDS Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=array-bounds 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-ARRAY-BOUNDS 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 6
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=enum Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-ENUM Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=enum 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-ENUM 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 7
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=float-cast-overflow Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-FLOAT-CAST-OVERFLOW Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=float-cast-overflow 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
# note: command had no output on stdout or stderr
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe' --check-prefixes=CHECK-UBSAN,CHECK-FLOAT-CAST-OVERFLOW 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp'
# note: command had no output on stdout or stderr
# RUN: at line 8
z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe -E -fsanitize=integer-divide-by-zero Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp -o - | z:\b\llvm-clang-x86_64-sie-win\build\bin\filecheck.exe --check-prefixes=CHECK-UBSAN,CHECK-INTEGER-DIVIDE-BY-ZERO Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp
# executed command: 'z:\b\llvm-clang-x86_64-sie-win\build\bin\clang.exe' -E -fsanitize=integer-divide-by-zero 'Z:\b\llvm-clang-x86_64-sie-win\llvm-project\clang\test\Lexer\has_feature_undefined_behavior_sanitizer.cpp' -o -
...
```
</details>
https://github.com/llvm/llvm-project/pull/148310
More information about the llvm-commits
mailing list