[clang] [webkit.UncountedLambdaCapturesChecker] Ignore trivial functions and [[clang::noescape]]. (PR #113845)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 31 00:25:44 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-cmake-x86_64-avx512-linux` running on `avx512-intel64` while building `clang` at step 7 "ninja check 1".

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

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

```
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang -cc1 -internal-isystem /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang -cc1 -internal-isystem /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From*) [with To = clang::ParenExpr; From = clang::Expr]: Assertion `detail::isPresent(Val) && "dyn_cast on a non-existent value"' 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: /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang -cc1 -internal-isystem /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x0000000001fe78a1 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x1fe78a1)
 #1 0x0000000001fe4e04 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f0fd74a0db0 __restore_rt (/lib64/libc.so.6+0x59db0)
 #3 0x00007f0fd74ed42c __pthread_kill_implementation (/lib64/libc.so.6+0xa642c)
 #4 0x00007f0fd74a0d06 gsignal (/lib64/libc.so.6+0x59d06)
 #5 0x00007f0fd74737d3 abort (/lib64/libc.so.6+0x2c7d3)
 #6 0x00007f0fd74736fb _nl_load_domain.cold (/lib64/libc.so.6+0x2c6fb)
 #7 0x00007f0fd7499c86 (/lib64/libc.so.6+0x52c86)
 #8 0x0000000004e8a4e7 clang::IgnoreParensSingleStep(clang::Expr*) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x4e8a4e7)
 #9 0x0000000005a013c0 clang::Expr::IgnoreParenCasts() (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x5a013c0)
#10 0x00000000044a4d3d clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclRefExpr(clang::DeclRefExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#11 0x000000000449e0e7 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseStmt(clang::Stmt*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) (.constprop.0) UncountedLambdaCapturesChecker.cpp:0:0
#12 0x00000000044a8416 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x0000000004498c15 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) (.part.0) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00000000044aadac clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionTemplateDecl(clang::FunctionTemplateDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x00000000044a522a clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) (.part.0) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00000000044a7c0a clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#17 0x00000000044ac156 void clang::ento::check::ASTDecl<clang::TranslationUnitDecl>::_checkDecl<(anonymous namespace)::UncountedLambdaCapturesChecker>(void*, clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x000000000455011f clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x455011f)
#19 0x000000000400f8d4 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#20 0x00000000046ce89c clang::ParseAST(clang::Sema&, bool, bool) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x46ce89c)
#21 0x0000000002be21d9 clang::FrontendAction::Execute() (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x2be21d9)
#22 0x0000000002b5c3b5 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x2b5c3b5)
#23 0x0000000002cba023 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0x2cba023)
#24 0x0000000000b55db7 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0xb55db7)
#25 0x0000000000b4d47a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#26 0x0000000000b51795 clang_main(int, char**, llvm::ToolContext const&) (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0xb51795)
#27 0x0000000000a84aa4 main (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0xa84aa4)
#28 0x00007f0fd748be50 __libc_start_call_main (/lib64/libc.so.6+0x44e50)
#29 0x00007f0fd748befc __libc_start_main at GLIBC_2.2.5 (/lib64/libc.so.6+0x44efc)
#30 0x0000000000b4cbb5 _start (/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang+0xb4cbb5)
/localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 3109642 Aborted                 (core dumped) /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/bin/clang -cc1 -internal-isystem /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/stage1/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /localdisk2/buildbot/llvm-worker/clang-cmake-x86_64-avx512-linux/llvm/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

********************


```

</details>

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


More information about the cfe-commits mailing list