[clang] [Clang] `constexpr` builtin floating point classification / comparison functions (PR #94118)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Sun Aug 18 03:38:27 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `sanitizer-x86_64-linux-fast` running on `sanitizer-buildbot4` while building `clang` at step 2 "annotate".

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

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-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/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: 85066 of 85067 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70..
FAIL: Clang :: Sema/constant-builtins-2.c (38188 of 85066)
******************** TEST 'Clang :: Sema/constant-builtins-2.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c

=================================================================
==865709==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0x5ca09b5c803d in operator new[](unsigned long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:89:3
    #1 0x5ca0a1eee2da in getMemory /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:45:10
    #2 0x5ca0a1eee2da in llvm::APInt::initSlowCase(llvm::APInt const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:86:12
    #3 0x5ca0abac7934 in APInt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/APInt.h:158:7
    #4 0x5ca0abac7934 in IntegralAP /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:62:25
    #5 0x5ca0abac7934 in clang::interp::IntegralAP<false> clang::interp::IntegralAP<false>::from<32u, true>(clang::interp::Integral<32u, true>, unsigned int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:117:12
    #6 0x5ca0ab94e912 in CastAP<(clang::interp::PrimType)4, clang::interp::Integral<32U, true> > /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Interp.h:2079:7
    #7 0x5ca0ab94e912 in emitCastAPSint32 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/lib/AST/Opcodes.inc:6031:10
    #8 0x5ca0ab94e912 in clang::interp::EvalEmitter::emitCastAP(clang::interp::PrimType, unsigned int, clang::interp::SourceInfo const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/lib/AST/Opcodes.inc:5954:12
    #9 0x5ca0ab8aeafa in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCastExpr(clang::CastExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:490:20
    #10 0x5ca0ab8b300f in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp
    #11 0x5ca0ab8bf66c in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitBuiltinCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3963:18
    #12 0x5ca0ab8bd1ec in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3982:12
    #13 0x5ca0ab8b300f in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp
    #14 0x5ca0ab8e4f5e in clang::interp::Compiler<clang::interp::EvalEmitter>::visitExpr(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3609:10
    #15 0x5ca0ab90eba9 in clang::interp::EvalEmitter::interpretExpr(clang::Expr const*, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/EvalEmitter.cpp:47:14
    #16 0x5ca0ab7c1681 in clang::interp::Context::evaluateAsRValue(clang::interp::State&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Context.cpp:49:16
    #17 0x5ca0ab5f54f9 in EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16011:38
    #18 0x5ca0ab5eb897 in EvaluateAsRValue(clang::Expr const*, clang::Expr::EvalResult&, clang::ASTContext const&, (anonymous namespace)::EvalInfo&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16088:10
    #19 0x5ca0ab5eb0ac in clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16137:10
    #20 0x5ca0ab5f4819 in clang::Expr::isEvaluatable(clang::ASTContext const&, clang::Expr::SideEffectsKind) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16412:10
    #21 0x5ca0ab5bca0f in clang::Expr::isConstantInitializer(clang::ASTContext&, bool, clang::Expr const**) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/Expr.cpp:3502:7
    #22 0x5ca0a8d5056d in clang::Sema::CheckForConstantInitializer(clang::Expr*, unsigned int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:12467:13
    #23 0x5ca0a8d56348 in clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:13749:7
Step 9 (stage2/asan_ubsan check) failure: stage2/asan_ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using lld-link: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:508: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-fast/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: 85066 of 85067 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70..
FAIL: Clang :: Sema/constant-builtins-2.c (38188 of 85066)
******************** TEST 'Clang :: Sema/constant-builtins-2.c' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
RUN: at line 2: /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Sema/constant-builtins-2.c

=================================================================
==865709==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0x5ca09b5c803d in operator new[](unsigned long) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:89:3
    #1 0x5ca0a1eee2da in getMemory /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:45:10
    #2 0x5ca0a1eee2da in llvm::APInt::initSlowCase(llvm::APInt const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/lib/Support/APInt.cpp:86:12
    #3 0x5ca0abac7934 in APInt /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/llvm/include/llvm/ADT/APInt.h:158:7
    #4 0x5ca0abac7934 in IntegralAP /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:62:25
    #5 0x5ca0abac7934 in clang::interp::IntegralAP<false> clang::interp::IntegralAP<false>::from<32u, true>(clang::interp::Integral<32u, true>, unsigned int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:117:12
    #6 0x5ca0ab94e912 in CastAP<(clang::interp::PrimType)4, clang::interp::Integral<32U, true> > /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Interp.h:2079:7
    #7 0x5ca0ab94e912 in emitCastAPSint32 /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/lib/AST/Opcodes.inc:6031:10
    #8 0x5ca0ab94e912 in clang::interp::EvalEmitter::emitCastAP(clang::interp::PrimType, unsigned int, clang::interp::SourceInfo const&) /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/lib/AST/Opcodes.inc:5954:12
    #9 0x5ca0ab8aeafa in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCastExpr(clang::CastExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:490:20
    #10 0x5ca0ab8b300f in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp
    #11 0x5ca0ab8bf66c in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitBuiltinCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3963:18
    #12 0x5ca0ab8bd1ec in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3982:12
    #13 0x5ca0ab8b300f in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp
    #14 0x5ca0ab8e4f5e in clang::interp::Compiler<clang::interp::EvalEmitter>::visitExpr(clang::Expr const*) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3609:10
    #15 0x5ca0ab90eba9 in clang::interp::EvalEmitter::interpretExpr(clang::Expr const*, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/EvalEmitter.cpp:47:14
    #16 0x5ca0ab7c1681 in clang::interp::Context::evaluateAsRValue(clang::interp::State&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ByteCode/Context.cpp:49:16
    #17 0x5ca0ab5f54f9 in EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16011:38
    #18 0x5ca0ab5eb897 in EvaluateAsRValue(clang::Expr const*, clang::Expr::EvalResult&, clang::ASTContext const&, (anonymous namespace)::EvalInfo&) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16088:10
    #19 0x5ca0ab5eb0ac in clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16137:10
    #20 0x5ca0ab5f4819 in clang::Expr::isEvaluatable(clang::ASTContext const&, clang::Expr::SideEffectsKind) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16412:10
    #21 0x5ca0ab5bca0f in clang::Expr::isConstantInitializer(clang::ASTContext&, bool, clang::Expr const**) const /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/AST/Expr.cpp:3502:7
    #22 0x5ca0a8d5056d in clang::Sema::CheckForConstantInitializer(clang::Expr*, unsigned int) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:12467:13
    #23 0x5ca0a8d56348 in clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool) /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:13749:7

```

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


More information about the cfe-commits mailing list