[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 04:37:02 PDT 2024


llvm-ci wrote:

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

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

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:508: 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:508: 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:508: 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:508: 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:508: 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:508: 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:508: 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: 85066 of 85067 tests, 88 workers --
Testing:  0.. 10..
FAIL: Clang :: Sema/constant-builtins-2.c (16887 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-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c

=================================================================
==2615403==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0x5d8e422f07bd in operator new[](unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:89:3
    #1 0x5d8e48b9265c in getMemory /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/APInt.cpp:45:10
    #2 0x5d8e48b9265c in llvm::APInt::initSlowCase(llvm::APInt const&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/APInt.cpp:86:12
    #3 0x5d8e5181aef3 in APInt /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/APInt.h:158:7
    #4 0x5d8e5181aef3 in IntegralAP /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:62:25
    #5 0x5d8e5181aef3 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-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:117:12
    #6 0x5d8e51664fc2 in bool clang::interp::CastAP<(clang::interp::PrimType)4, clang::interp::Integral<32u, true>>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Interp.h:2079:7
    #7 0x5d8e51576bf1 in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCastExpr(clang::CastExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:490:20
    #8 0x5d8e5157a87c in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3264:16
    #9 0x5d8e5158682b in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitBuiltinCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3963:18
    #10 0x5d8e515846ff in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3982:12
    #11 0x5d8e5157a87c in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3264:16
    #12 0x5d8e515ae04a in clang::interp::Compiler<clang::interp::EvalEmitter>::visitExpr(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3609:10
    #13 0x5d8e5161809e in clang::interp::EvalEmitter::interpretExpr(clang::Expr const*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/EvalEmitter.cpp:47:14
    #14 0x5d8e5152dc19 in clang::interp::Context::evaluateAsRValue(clang::interp::State&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Context.cpp:49:16
    #15 0x5d8e51372225 in EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16011:38
    #16 0x5d8e51366b93 in EvaluateAsRValue /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16088:10
    #17 0x5d8e51366b93 in clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16137:10
    #18 0x5d8e5137160e in clang::Expr::isEvaluatable(clang::ASTContext const&, clang::Expr::SideEffectsKind) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16412:10
    #19 0x5d8e5133f936 in clang::Expr::isConstantInitializer(clang::ASTContext&, bool, clang::Expr const**) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/Expr.cpp:3502:7
    #20 0x5d8e4f07c28c in clang::Sema::CheckForConstantInitializer(clang::Expr*, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:12467:13
    #21 0x5d8e4f0815cc in clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:13749:7
    #22 0x5d8e4e9895e1 in clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2830:17
    #23 0x5d8e4e9825ce in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2523:7
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:508: 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:508: 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:508: 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:508: 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:508: 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:508: 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:508: 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: 85066 of 85067 tests, 88 workers --
Testing:  0.. 10..
FAIL: Clang :: Sema/constant-builtins-2.c (16887 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-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
RUN: at line 2: /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c
+ /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm_build_asan/lib/clang/20/include -nostdsysteminc -fsyntax-only -fexperimental-new-constant-interpreter -verify /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/test/Sema/constant-builtins-2.c

=================================================================
==2615403==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 64 byte(s) in 4 object(s) allocated from:
    #0 0x5d8e422f07bd in operator new[](unsigned long) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:89:3
    #1 0x5d8e48b9265c in getMemory /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/APInt.cpp:45:10
    #2 0x5d8e48b9265c in llvm::APInt::initSlowCase(llvm::APInt const&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/lib/Support/APInt.cpp:86:12
    #3 0x5d8e5181aef3 in APInt /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/llvm/include/llvm/ADT/APInt.h:158:7
    #4 0x5d8e5181aef3 in IntegralAP /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:62:25
    #5 0x5d8e5181aef3 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-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/IntegralAP.h:117:12
    #6 0x5d8e51664fc2 in bool clang::interp::CastAP<(clang::interp::PrimType)4, clang::interp::Integral<32u, true>>(clang::interp::InterpState&, clang::interp::CodePtr, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Interp.h:2079:7
    #7 0x5d8e51576bf1 in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCastExpr(clang::CastExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:490:20
    #8 0x5d8e5157a87c in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3264:16
    #9 0x5d8e5158682b in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitBuiltinCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3963:18
    #10 0x5d8e515846ff in clang::interp::Compiler<clang::interp::EvalEmitter>::VisitCallExpr(clang::CallExpr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3982:12
    #11 0x5d8e5157a87c in clang::interp::Compiler<clang::interp::EvalEmitter>::visit(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3264:16
    #12 0x5d8e515ae04a in clang::interp::Compiler<clang::interp::EvalEmitter>::visitExpr(clang::Expr const*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Compiler.cpp:3609:10
    #13 0x5d8e5161809e in clang::interp::EvalEmitter::interpretExpr(clang::Expr const*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/EvalEmitter.cpp:47:14
    #14 0x5d8e5152dc19 in clang::interp::Context::evaluateAsRValue(clang::interp::State&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ByteCode/Context.cpp:49:16
    #15 0x5d8e51372225 in EvaluateAsRValue((anonymous namespace)::EvalInfo&, clang::Expr const*, clang::APValue&) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16011:38
    #16 0x5d8e51366b93 in EvaluateAsRValue /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16088:10
    #17 0x5d8e51366b93 in clang::Expr::EvaluateAsRValue(clang::Expr::EvalResult&, clang::ASTContext const&, bool) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16137:10
    #18 0x5d8e5137160e in clang::Expr::isEvaluatable(clang::ASTContext const&, clang::Expr::SideEffectsKind) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/ExprConstant.cpp:16412:10
    #19 0x5d8e5133f936 in clang::Expr::isConstantInitializer(clang::ASTContext&, bool, clang::Expr const**) const /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/AST/Expr.cpp:3502:7
    #20 0x5d8e4f07c28c in clang::Sema::CheckForConstantInitializer(clang::Expr*, unsigned int) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:12467:13
    #21 0x5d8e4f0815cc in clang::Sema::AddInitializerToDecl(clang::Decl*, clang::Expr*, bool) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Sema/SemaDecl.cpp:13749:7
    #22 0x5d8e4e9895e1 in clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2830:17
    #23 0x5d8e4e9825ce in clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, clang::DeclaratorContext, clang::ParsedAttributes&, clang::Parser::ParsedTemplateInfo&, clang::SourceLocation*, clang::Parser::ForRangeInit*) /home/b/sanitizer-x86_64-linux-bootstrap-asan/build/llvm-project/clang/lib/Parse/ParseDecl.cpp:2523:7

```

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


More information about the cfe-commits mailing list