Skip to content

Conversation

@rniwa
Copy link
Contributor

@rniwa rniwa commented Oct 27, 2024

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial functions as well as the one being passed to an argument with [[clang::noescape]] attribute. This dramatically reduces the false positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking lambdas via VisitDeclRefExpr and VisitCallExpr. The idea is that if a lambda is defined but never called or stored somewhere, then capturing whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and registers its DeclRefExpr to be ignored in VisitDeclRefExpr. If a lambda is being passed to a function, it checks whether its argument is annotated with [[clang::noescape]]. If it's not annotated such, it checks captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as function type parameters are variadic template function so we hard-code this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and adds a bunch of tests.

…[[clang::noescape]].

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial functions as well as
the one being passed to an argument with [[clang::noescape]] attribute. This dramatically
reduces the false positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking lambdas via VisitDeclRefExpr
and VisitCallExpr. The idea is that if a lambda is defined but never called or stored somewhere,
then capturing whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and registers its DeclRefExpr
to be ignored in VisitDeclRefExpr. If a lambda is being passed to a function, it checks whether
its argument is annotated with [[clang::noescape]]. If it's not annotated such, it checks
captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as function type parameters
are variadic template function so we hard-code this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and adds a bunch of tests.
@llvmbot llvmbot added clang Clang issues not falling into any other category clang:static analyzer labels Oct 27, 2024
@llvmbot
Copy link
Member

llvmbot commented Oct 27, 2024

@llvm/pr-subscribers-clang

Author: Ryosuke Niwa (rniwa)

Changes

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial functions as well as the one being passed to an argument with [[clang::noescape]] attribute. This dramatically reduces the false positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking lambdas via VisitDeclRefExpr and VisitCallExpr. The idea is that if a lambda is defined but never called or stored somewhere, then capturing whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and registers its DeclRefExpr to be ignored in VisitDeclRefExpr. If a lambda is being passed to a function, it checks whether its argument is annotated with [[clang::noescape]]. If it's not annotated such, it checks captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as function type parameters are variadic template function so we hard-code this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and adds a bunch of tests.


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

4 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h (+4)
  • (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp (+92-10)
  • (modified) clang/test/Analysis/Checkers/WebKit/mock-types.h (+2)
  • (modified) clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (+135-24)
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
index 4b41ca96e1df1d..814015c311d61e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
@@ -63,6 +63,10 @@ std::optional<bool> isUncounted(const clang::CXXRecordDecl* Class);
 /// class, false if not, std::nullopt if inconclusive.
 std::optional<bool> isUncountedPtr(const clang::QualType T);
 
+/// \returns true if \p T is either a raw pointer or reference to an uncounted
+/// or unchecked class, false if not, std::nullopt if inconclusive.
+std::optional<bool> isUnsafePtr(const QualType T);
+
 /// \returns true if \p T is a RefPtr, Ref, CheckedPtr, CheckedRef, or its
 /// variant, false if not.
 bool isSafePtrType(const clang::QualType T);
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
index 998bd4ccee07db..02f68ac5e41317 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "ASTUtils.h"
 #include "DiagOutputUtils.h"
 #include "PtrTypesSemantics.h"
 #include "clang/AST/CXXInheritance.h"
@@ -26,6 +27,7 @@ class UncountedLambdaCapturesChecker
   BugType Bug{this, "Lambda capture of uncounted variable",
               "WebKit coding guidelines"};
   mutable BugReporter *BR = nullptr;
+  TrivialFunctionAnalysis TFA;
 
 public:
   void checkASTDecl(const TranslationUnitDecl *TUD, AnalysisManager &MGR,
@@ -37,6 +39,8 @@ class UncountedLambdaCapturesChecker
     // want to visit those, so we make our own RecursiveASTVisitor.
     struct LocalVisitor : public RecursiveASTVisitor<LocalVisitor> {
       const UncountedLambdaCapturesChecker *Checker;
+      llvm::DenseSet<const DeclRefExpr *> DeclRefExprsToIgnore;
+
       explicit LocalVisitor(const UncountedLambdaCapturesChecker *Checker)
           : Checker(Checker) {
         assert(Checker);
@@ -45,8 +49,61 @@ class UncountedLambdaCapturesChecker
       bool shouldVisitTemplateInstantiations() const { return true; }
       bool shouldVisitImplicitCode() const { return false; }
 
-      bool VisitLambdaExpr(LambdaExpr *L) {
-        Checker->visitLambdaExpr(L);
+      bool VisitDeclRefExpr(DeclRefExpr *DRE) {
+        if (DeclRefExprsToIgnore.contains(DRE))
+          return true;
+        if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) {
+          auto *Init = VD->getInit()->IgnoreParenCasts();
+          if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) {
+            Checker->visitLambdaExpr(L);
+            return true;
+          }
+        }
+        return true;
+      }
+
+      // WTF::switchOn(T, F... f) is a variadic template function and couldn't be annotated with NOESCAPE.
+      // We hard code it here to workaround that.
+      bool shouldTreatAllArgAsNoEscape(FunctionDecl *Decl) {
+        auto *NsDecl = Decl->getParent();
+        if (!NsDecl || !isa<NamespaceDecl>(NsDecl))
+          return false;
+        return safeGetName(NsDecl) == "WTF" && safeGetName(Decl) == "switchOn";
+      }
+
+      bool VisitCallExpr(CallExpr *CE) {
+        if (auto *Callee = CE->getCallee()) {
+          if (auto *DRE = dyn_cast<DeclRefExpr>(Callee->IgnoreParenCasts())) {
+            if (auto *MD = dyn_cast_or_null<CXXMethodDecl>(DRE->getDecl())) {
+              if (CE->getNumArgs() == 1) {
+                auto *Arg = CE->getArg(0)->IgnoreParenCasts();
+                if (auto *DRE = dyn_cast<DeclRefExpr>(Arg)) {
+                  if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) {
+                    auto *Init = VD->getInit()->IgnoreParenCasts();
+                    if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) {
+                      DeclRefExprsToIgnore.insert(DRE);
+                      Checker->visitLambdaExpr(L, /* ignoreParamVarDecl */ true);
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+        if (auto *Callee = CE->getDirectCallee()) {
+          bool TreatAllArgsAsNoEscape = shouldTreatAllArgAsNoEscape(Callee);
+          unsigned ArgIndex = 0;
+          for (auto *Param : Callee->parameters()) {
+            if (ArgIndex >= CE->getNumArgs())
+              break;
+            auto *Arg = CE->getArg(ArgIndex)->IgnoreParenCasts();
+            if (!Param->hasAttr<NoEscapeAttr>() && !TreatAllArgsAsNoEscape) {
+              if (auto *L = dyn_cast_or_null<LambdaExpr>(Arg->IgnoreParenCasts()))
+                Checker->visitLambdaExpr(L);
+            }
+            ++ArgIndex;
+          }
+        }
         return true;
       }
     };
@@ -55,22 +112,28 @@ class UncountedLambdaCapturesChecker
     visitor.TraverseDecl(const_cast<TranslationUnitDecl *>(TUD));
   }
 
-  void visitLambdaExpr(LambdaExpr *L) const {
+  void visitLambdaExpr(LambdaExpr *L, bool ignoreParamVarDecl = false) const {
+    if (TFA.isTrivial(L->getBody()))
+      return;
     for (const LambdaCapture &C : L->captures()) {
       if (C.capturesVariable()) {
         ValueDecl *CapturedVar = C.getCapturedVar();
+        if (ignoreParamVarDecl && isa<ParmVarDecl>(CapturedVar))
+          continue;
         QualType CapturedVarQualType = CapturedVar->getType();
-        if (auto *CapturedVarType = CapturedVarQualType.getTypePtrOrNull()) {
-          auto IsUncountedPtr = isUncountedPtr(CapturedVarQualType);
-          if (IsUncountedPtr && *IsUncountedPtr)
-            reportBug(C, CapturedVar, CapturedVarType);
-        }
+        auto IsUncountedPtr = isUnsafePtr(CapturedVar->getType());
+        if (IsUncountedPtr && *IsUncountedPtr)
+          reportBug(C, CapturedVar, CapturedVarQualType);
+      } else if (C.capturesThis()) {
+        if (ignoreParamVarDecl) // this is always a parameter to this function.
+          continue;
+        reportBugOnThisPtr(C);
       }
     }
   }
 
   void reportBug(const LambdaCapture &Capture, ValueDecl *CapturedVar,
-                 const Type *T) const {
+                 const QualType T) const {
     assert(CapturedVar);
 
     SmallString<100> Buf;
@@ -89,7 +152,26 @@ class UncountedLambdaCapturesChecker
     }
 
     printQuotedQualifiedName(Os, Capture.getCapturedVar());
-    Os << " to uncounted type is unsafe.";
+    Os << " to ref-counted / CheckedPtr capable type is unsafe.";
+
+    PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager());
+    auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
+    BR->emitReport(std::move(Report));
+  }
+
+  void reportBugOnThisPtr(const LambdaCapture &Capture) const {
+    assert(CapturedVar);
+
+    SmallString<100> Buf;
+    llvm::raw_svector_ostream Os(Buf);
+
+    if (Capture.isExplicit()) {
+      Os << "Captured ";
+    } else {
+      Os << "Implicitly captured ";
+    }
+
+    Os << "raw-pointer 'this' to ref-counted / CheckedPtr capable type is unsafe.";
 
     PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager());
     auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
diff --git a/clang/test/Analysis/Checkers/WebKit/mock-types.h b/clang/test/Analysis/Checkers/WebKit/mock-types.h
index 8d8a90f0afae0e..1291227c1a772b 100644
--- a/clang/test/Analysis/Checkers/WebKit/mock-types.h
+++ b/clang/test/Analysis/Checkers/WebKit/mock-types.h
@@ -103,7 +103,9 @@ struct RefCountable {
   void ref() {}
   void deref() {}
   void method();
+  void constMethod() const;
   int trivial() { return 123; }
+  RefCountable* next();
 };
 
 template <typename T> T *downcast(T *t) { return t; }
diff --git a/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp b/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
index 27e0a74d583cd3..f676367fe74d0b 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
@@ -1,39 +1,73 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker %s 2>&1 | FileCheck %s --strict-whitespace
-#include "mock-types.h"
+// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify %s
+//#include "mock-types.h"
+
+struct RefCountable {
+//  static Ref<RefCountable> create();
+  void ref() {}
+  void deref() {}
+  void method();
+  void constMethod() const;
+  int trivial() { return 123; }
+  RefCountable* next();
+};
+
+RefCountable* make_obj();
+
+void someFunction();
+template <typename Callback> void call(Callback callback) {
+  someFunction();
+  callback();
+}
 
 void raw_ptr() {
-  RefCountable* ref_countable = nullptr;
-  auto foo1 = [ref_countable](){};
-  // CHECK: warning: Captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  // CHECK-NEXT:{{^   6 | }}  auto foo1 = [ref_countable](){};
-  // CHECK-NEXT:{{^     | }}               ^
-  auto foo2 = [&ref_countable](){};
-  // CHECK: warning: Captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo3 = [&](){ ref_countable = nullptr; };
-  // CHECK: warning: Implicitly captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  // CHECK-NEXT:{{^  12 | }}  auto foo3 = [&](){ ref_countable = nullptr; };
-  // CHECK-NEXT:{{^     | }}                     ^
-  auto foo4 = [=](){ (void) ref_countable; };
-  // CHECK: warning: Implicitly captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  RefCountable* ref_countable = make_obj();
+  auto foo1 = [ref_countable](){
+    // expected-warning@-1{{Captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable->method();
+  };
+  auto foo2 = [&ref_countable](){
+    // expected-warning@-1{{Captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable->method();
+  };
+  auto foo3 = [&](){
+    ref_countable->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable = nullptr;
+  };
+
+  auto foo4 = [=](){
+    ref_countable->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  };
+
+  call(foo1);
+  call(foo2);
+  call(foo3);
+  call(foo4);
 
   // Confirm that the checker respects [[clang::suppress]].
   RefCountable* suppressed_ref_countable = nullptr;
   [[clang::suppress]] auto foo5 = [suppressed_ref_countable](){};
-  // CHECK-NOT: warning: Captured raw-pointer 'suppressed_ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  // no warning.
+  call(foo5);
 }
 
 void references() {
   RefCountable automatic;
   RefCountable& ref_countable_ref = automatic;
+  auto foo1 = [ref_countable_ref](){ ref_countable_ref.constMethod(); };
+  // expected-warning@-1{{Captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo2 = [&ref_countable_ref](){ ref_countable_ref.method(); };
+  // expected-warning@-1{{Captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo3 = [&](){ ref_countable_ref.method(); };
+  // expected-warning@-1{{Implicitly captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo4 = [=](){ ref_countable_ref.constMethod(); };
+  // expected-warning@-1{{Implicitly captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
 
-  auto foo1 = [ref_countable_ref](){};
-  // CHECK: warning: Captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo2 = [&ref_countable_ref](){};
-  // CHECK: warning: Captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo3 = [&](){ (void) ref_countable_ref; };
-  // CHECK: warning: Implicitly captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo4 = [=](){ (void) ref_countable_ref; };
-  // CHECK: warning: Implicitly captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  call(foo1);
+  call(foo2);
+  call(foo3);
+  call(foo4);
 }
 
 void quiet() {
@@ -45,5 +79,82 @@ void quiet() {
 
   auto foo3 = [&]() {};
   auto foo4 = [=]() {};
+
+  call(foo3);
+  call(foo4);
+
   RefCountable *ref_countable = nullptr;
 }
+
+template <typename Callback>
+void map(RefCountable* start, [[clang::noescape]] Callback&& callback)
+{
+  while (start) {
+    callback(*start);
+    start = start->next();
+  }
+}
+
+template <typename Callback1, typename Callback2>
+void doubleMap(RefCountable* start, [[clang::noescape]] Callback1&& callback1, Callback2&& callback2)
+{
+  while (start) {
+    callback1(*start);
+    callback2(*start);
+    start = start->next();
+  }
+}
+
+void noescape_lambda() {
+  RefCountable* someObj = make_obj();
+  RefCountable* otherObj = make_obj();
+  map(make_obj(), [&](RefCountable& obj) {
+    otherObj->method();
+  });
+  doubleMap(make_obj(), [&](RefCountable& obj) {
+    otherObj->method();
+  }, [&](RefCountable& obj) {
+    otherObj->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'otherObj' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  });
+  ([&] {
+    someObj->method();
+  })();
+}
+
+void lambda_capture_param(RefCountable* obj) {
+  auto someLambda = [&] {
+    obj->method();
+  };
+  someLambda();
+  someLambda();
+}
+
+struct RefCountableWithLambdaCapturingThis {
+  void ref() const;
+  void deref() const;
+  void nonTrivial();
+
+  void method_captures_this_safe() {
+    auto lambda = [&]() {
+      nonTrivial();
+    };
+    lambda();
+  }
+
+  void method_captures_this_unsafe() {
+    auto lambda = [&]() {
+      nonTrivial();
+      // expected-warning@-1{{Implicitly captured raw-pointer 'this' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    };
+    call(lambda);
+  }
+};
+
+void trivial_lambda() {
+  RefCountable* ref_countable = make_obj();
+  auto trivial_lambda = [&]() {
+    return ref_countable->trivial();
+  };
+  trivial_lambda();
+}

@llvmbot
Copy link
Member

llvmbot commented Oct 27, 2024

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Ryosuke Niwa (rniwa)

Changes

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial functions as well as the one being passed to an argument with [[clang::noescape]] attribute. This dramatically reduces the false positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking lambdas via VisitDeclRefExpr and VisitCallExpr. The idea is that if a lambda is defined but never called or stored somewhere, then capturing whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and registers its DeclRefExpr to be ignored in VisitDeclRefExpr. If a lambda is being passed to a function, it checks whether its argument is annotated with [[clang::noescape]]. If it's not annotated such, it checks captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as function type parameters are variadic template function so we hard-code this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and adds a bunch of tests.


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

4 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h (+4)
  • (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp (+92-10)
  • (modified) clang/test/Analysis/Checkers/WebKit/mock-types.h (+2)
  • (modified) clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (+135-24)
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
index 4b41ca96e1df1d..814015c311d61e 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.h
@@ -63,6 +63,10 @@ std::optional<bool> isUncounted(const clang::CXXRecordDecl* Class);
 /// class, false if not, std::nullopt if inconclusive.
 std::optional<bool> isUncountedPtr(const clang::QualType T);
 
+/// \returns true if \p T is either a raw pointer or reference to an uncounted
+/// or unchecked class, false if not, std::nullopt if inconclusive.
+std::optional<bool> isUnsafePtr(const QualType T);
+
 /// \returns true if \p T is a RefPtr, Ref, CheckedPtr, CheckedRef, or its
 /// variant, false if not.
 bool isSafePtrType(const clang::QualType T);
diff --git a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
index 998bd4ccee07db..02f68ac5e41317 100644
--- a/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp
@@ -6,6 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "ASTUtils.h"
 #include "DiagOutputUtils.h"
 #include "PtrTypesSemantics.h"
 #include "clang/AST/CXXInheritance.h"
@@ -26,6 +27,7 @@ class UncountedLambdaCapturesChecker
   BugType Bug{this, "Lambda capture of uncounted variable",
               "WebKit coding guidelines"};
   mutable BugReporter *BR = nullptr;
+  TrivialFunctionAnalysis TFA;
 
 public:
   void checkASTDecl(const TranslationUnitDecl *TUD, AnalysisManager &MGR,
@@ -37,6 +39,8 @@ class UncountedLambdaCapturesChecker
     // want to visit those, so we make our own RecursiveASTVisitor.
     struct LocalVisitor : public RecursiveASTVisitor<LocalVisitor> {
       const UncountedLambdaCapturesChecker *Checker;
+      llvm::DenseSet<const DeclRefExpr *> DeclRefExprsToIgnore;
+
       explicit LocalVisitor(const UncountedLambdaCapturesChecker *Checker)
           : Checker(Checker) {
         assert(Checker);
@@ -45,8 +49,61 @@ class UncountedLambdaCapturesChecker
       bool shouldVisitTemplateInstantiations() const { return true; }
       bool shouldVisitImplicitCode() const { return false; }
 
-      bool VisitLambdaExpr(LambdaExpr *L) {
-        Checker->visitLambdaExpr(L);
+      bool VisitDeclRefExpr(DeclRefExpr *DRE) {
+        if (DeclRefExprsToIgnore.contains(DRE))
+          return true;
+        if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) {
+          auto *Init = VD->getInit()->IgnoreParenCasts();
+          if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) {
+            Checker->visitLambdaExpr(L);
+            return true;
+          }
+        }
+        return true;
+      }
+
+      // WTF::switchOn(T, F... f) is a variadic template function and couldn't be annotated with NOESCAPE.
+      // We hard code it here to workaround that.
+      bool shouldTreatAllArgAsNoEscape(FunctionDecl *Decl) {
+        auto *NsDecl = Decl->getParent();
+        if (!NsDecl || !isa<NamespaceDecl>(NsDecl))
+          return false;
+        return safeGetName(NsDecl) == "WTF" && safeGetName(Decl) == "switchOn";
+      }
+
+      bool VisitCallExpr(CallExpr *CE) {
+        if (auto *Callee = CE->getCallee()) {
+          if (auto *DRE = dyn_cast<DeclRefExpr>(Callee->IgnoreParenCasts())) {
+            if (auto *MD = dyn_cast_or_null<CXXMethodDecl>(DRE->getDecl())) {
+              if (CE->getNumArgs() == 1) {
+                auto *Arg = CE->getArg(0)->IgnoreParenCasts();
+                if (auto *DRE = dyn_cast<DeclRefExpr>(Arg)) {
+                  if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) {
+                    auto *Init = VD->getInit()->IgnoreParenCasts();
+                    if (auto *L = dyn_cast_or_null<LambdaExpr>(Init)) {
+                      DeclRefExprsToIgnore.insert(DRE);
+                      Checker->visitLambdaExpr(L, /* ignoreParamVarDecl */ true);
+                    }
+                  }
+                }
+              }
+            }
+          }
+        }
+        if (auto *Callee = CE->getDirectCallee()) {
+          bool TreatAllArgsAsNoEscape = shouldTreatAllArgAsNoEscape(Callee);
+          unsigned ArgIndex = 0;
+          for (auto *Param : Callee->parameters()) {
+            if (ArgIndex >= CE->getNumArgs())
+              break;
+            auto *Arg = CE->getArg(ArgIndex)->IgnoreParenCasts();
+            if (!Param->hasAttr<NoEscapeAttr>() && !TreatAllArgsAsNoEscape) {
+              if (auto *L = dyn_cast_or_null<LambdaExpr>(Arg->IgnoreParenCasts()))
+                Checker->visitLambdaExpr(L);
+            }
+            ++ArgIndex;
+          }
+        }
         return true;
       }
     };
@@ -55,22 +112,28 @@ class UncountedLambdaCapturesChecker
     visitor.TraverseDecl(const_cast<TranslationUnitDecl *>(TUD));
   }
 
-  void visitLambdaExpr(LambdaExpr *L) const {
+  void visitLambdaExpr(LambdaExpr *L, bool ignoreParamVarDecl = false) const {
+    if (TFA.isTrivial(L->getBody()))
+      return;
     for (const LambdaCapture &C : L->captures()) {
       if (C.capturesVariable()) {
         ValueDecl *CapturedVar = C.getCapturedVar();
+        if (ignoreParamVarDecl && isa<ParmVarDecl>(CapturedVar))
+          continue;
         QualType CapturedVarQualType = CapturedVar->getType();
-        if (auto *CapturedVarType = CapturedVarQualType.getTypePtrOrNull()) {
-          auto IsUncountedPtr = isUncountedPtr(CapturedVarQualType);
-          if (IsUncountedPtr && *IsUncountedPtr)
-            reportBug(C, CapturedVar, CapturedVarType);
-        }
+        auto IsUncountedPtr = isUnsafePtr(CapturedVar->getType());
+        if (IsUncountedPtr && *IsUncountedPtr)
+          reportBug(C, CapturedVar, CapturedVarQualType);
+      } else if (C.capturesThis()) {
+        if (ignoreParamVarDecl) // this is always a parameter to this function.
+          continue;
+        reportBugOnThisPtr(C);
       }
     }
   }
 
   void reportBug(const LambdaCapture &Capture, ValueDecl *CapturedVar,
-                 const Type *T) const {
+                 const QualType T) const {
     assert(CapturedVar);
 
     SmallString<100> Buf;
@@ -89,7 +152,26 @@ class UncountedLambdaCapturesChecker
     }
 
     printQuotedQualifiedName(Os, Capture.getCapturedVar());
-    Os << " to uncounted type is unsafe.";
+    Os << " to ref-counted / CheckedPtr capable type is unsafe.";
+
+    PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager());
+    auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
+    BR->emitReport(std::move(Report));
+  }
+
+  void reportBugOnThisPtr(const LambdaCapture &Capture) const {
+    assert(CapturedVar);
+
+    SmallString<100> Buf;
+    llvm::raw_svector_ostream Os(Buf);
+
+    if (Capture.isExplicit()) {
+      Os << "Captured ";
+    } else {
+      Os << "Implicitly captured ";
+    }
+
+    Os << "raw-pointer 'this' to ref-counted / CheckedPtr capable type is unsafe.";
 
     PathDiagnosticLocation BSLoc(Capture.getLocation(), BR->getSourceManager());
     auto Report = std::make_unique<BasicBugReport>(Bug, Os.str(), BSLoc);
diff --git a/clang/test/Analysis/Checkers/WebKit/mock-types.h b/clang/test/Analysis/Checkers/WebKit/mock-types.h
index 8d8a90f0afae0e..1291227c1a772b 100644
--- a/clang/test/Analysis/Checkers/WebKit/mock-types.h
+++ b/clang/test/Analysis/Checkers/WebKit/mock-types.h
@@ -103,7 +103,9 @@ struct RefCountable {
   void ref() {}
   void deref() {}
   void method();
+  void constMethod() const;
   int trivial() { return 123; }
+  RefCountable* next();
 };
 
 template <typename T> T *downcast(T *t) { return t; }
diff --git a/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp b/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
index 27e0a74d583cd3..f676367fe74d0b 100644
--- a/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+++ b/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
@@ -1,39 +1,73 @@
-// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker %s 2>&1 | FileCheck %s --strict-whitespace
-#include "mock-types.h"
+// RUN: %clang_analyze_cc1 -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify %s
+//#include "mock-types.h"
+
+struct RefCountable {
+//  static Ref<RefCountable> create();
+  void ref() {}
+  void deref() {}
+  void method();
+  void constMethod() const;
+  int trivial() { return 123; }
+  RefCountable* next();
+};
+
+RefCountable* make_obj();
+
+void someFunction();
+template <typename Callback> void call(Callback callback) {
+  someFunction();
+  callback();
+}
 
 void raw_ptr() {
-  RefCountable* ref_countable = nullptr;
-  auto foo1 = [ref_countable](){};
-  // CHECK: warning: Captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  // CHECK-NEXT:{{^   6 | }}  auto foo1 = [ref_countable](){};
-  // CHECK-NEXT:{{^     | }}               ^
-  auto foo2 = [&ref_countable](){};
-  // CHECK: warning: Captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo3 = [&](){ ref_countable = nullptr; };
-  // CHECK: warning: Implicitly captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  // CHECK-NEXT:{{^  12 | }}  auto foo3 = [&](){ ref_countable = nullptr; };
-  // CHECK-NEXT:{{^     | }}                     ^
-  auto foo4 = [=](){ (void) ref_countable; };
-  // CHECK: warning: Implicitly captured raw-pointer 'ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  RefCountable* ref_countable = make_obj();
+  auto foo1 = [ref_countable](){
+    // expected-warning@-1{{Captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable->method();
+  };
+  auto foo2 = [&ref_countable](){
+    // expected-warning@-1{{Captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable->method();
+  };
+  auto foo3 = [&](){
+    ref_countable->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    ref_countable = nullptr;
+  };
+
+  auto foo4 = [=](){
+    ref_countable->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'ref_countable' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  };
+
+  call(foo1);
+  call(foo2);
+  call(foo3);
+  call(foo4);
 
   // Confirm that the checker respects [[clang::suppress]].
   RefCountable* suppressed_ref_countable = nullptr;
   [[clang::suppress]] auto foo5 = [suppressed_ref_countable](){};
-  // CHECK-NOT: warning: Captured raw-pointer 'suppressed_ref_countable' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  // no warning.
+  call(foo5);
 }
 
 void references() {
   RefCountable automatic;
   RefCountable& ref_countable_ref = automatic;
+  auto foo1 = [ref_countable_ref](){ ref_countable_ref.constMethod(); };
+  // expected-warning@-1{{Captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo2 = [&ref_countable_ref](){ ref_countable_ref.method(); };
+  // expected-warning@-1{{Captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo3 = [&](){ ref_countable_ref.method(); };
+  // expected-warning@-1{{Implicitly captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  auto foo4 = [=](){ ref_countable_ref.constMethod(); };
+  // expected-warning@-1{{Implicitly captured reference 'ref_countable_ref' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
 
-  auto foo1 = [ref_countable_ref](){};
-  // CHECK: warning: Captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo2 = [&ref_countable_ref](){};
-  // CHECK: warning: Captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo3 = [&](){ (void) ref_countable_ref; };
-  // CHECK: warning: Implicitly captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
-  auto foo4 = [=](){ (void) ref_countable_ref; };
-  // CHECK: warning: Implicitly captured reference 'ref_countable_ref' to uncounted type is unsafe [webkit.UncountedLambdaCapturesChecker]
+  call(foo1);
+  call(foo2);
+  call(foo3);
+  call(foo4);
 }
 
 void quiet() {
@@ -45,5 +79,82 @@ void quiet() {
 
   auto foo3 = [&]() {};
   auto foo4 = [=]() {};
+
+  call(foo3);
+  call(foo4);
+
   RefCountable *ref_countable = nullptr;
 }
+
+template <typename Callback>
+void map(RefCountable* start, [[clang::noescape]] Callback&& callback)
+{
+  while (start) {
+    callback(*start);
+    start = start->next();
+  }
+}
+
+template <typename Callback1, typename Callback2>
+void doubleMap(RefCountable* start, [[clang::noescape]] Callback1&& callback1, Callback2&& callback2)
+{
+  while (start) {
+    callback1(*start);
+    callback2(*start);
+    start = start->next();
+  }
+}
+
+void noescape_lambda() {
+  RefCountable* someObj = make_obj();
+  RefCountable* otherObj = make_obj();
+  map(make_obj(), [&](RefCountable& obj) {
+    otherObj->method();
+  });
+  doubleMap(make_obj(), [&](RefCountable& obj) {
+    otherObj->method();
+  }, [&](RefCountable& obj) {
+    otherObj->method();
+    // expected-warning@-1{{Implicitly captured raw-pointer 'otherObj' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+  });
+  ([&] {
+    someObj->method();
+  })();
+}
+
+void lambda_capture_param(RefCountable* obj) {
+  auto someLambda = [&] {
+    obj->method();
+  };
+  someLambda();
+  someLambda();
+}
+
+struct RefCountableWithLambdaCapturingThis {
+  void ref() const;
+  void deref() const;
+  void nonTrivial();
+
+  void method_captures_this_safe() {
+    auto lambda = [&]() {
+      nonTrivial();
+    };
+    lambda();
+  }
+
+  void method_captures_this_unsafe() {
+    auto lambda = [&]() {
+      nonTrivial();
+      // expected-warning@-1{{Implicitly captured raw-pointer 'this' to ref-counted / CheckedPtr capable type is unsafe [webkit.UncountedLambdaCapturesChecker]}}
+    };
+    call(lambda);
+  }
+};
+
+void trivial_lambda() {
+  RefCountable* ref_countable = make_obj();
+  auto trivial_lambda = [&]() {
+    return ref_countable->trivial();
+  };
+  trivial_lambda();
+}

@github-actions
Copy link

github-actions bot commented Oct 27, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@rniwa rniwa requested a review from t-rasmud October 27, 2024 23:58
Copy link
Contributor

@t-rasmud t-rasmud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of small nits that I left as comments. Otherwise LGTM!
Also, thank you for writing detailed explanations in your PR descriptions, they help me catch up to your code quickly.

@rniwa
Copy link
Contributor Author

rniwa commented Oct 31, 2024

Thanks for the review!

@rniwa rniwa merged commit 287781c into llvm:main Oct 31, 2024
6 of 8 checks passed
@rniwa rniwa deleted the trivial-lambdas-and-noescape branch October 31, 2024 07:14
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-sie-ubuntu-fast running on sie-linux-worker while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
clang-tidy: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x00005781c8be43b0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x4c043b0)
 #1 0x00005781c8be17bf llvm::sys::RunSignalHandlers() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x4c017bf)
 #2 0x00005781c8be1915 SignalHandler(int) Signals.cpp:0:0
 #3 0x000075c1bd92c520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000075c1bd9809fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x000075c1bd9809fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x000075c1bd9809fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x000075c1bd92c476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x000075c1bd9127f3 abort ./stdlib/abort.c:81:7
 #9 0x000075c1bd91271b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x000075c1bd923e96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x00005781c6c40187 clang::IgnoreParensSingleStep(clang::Expr*) crtstuff.c:0:0
#12 0x00005781c7816948 clang::Expr::IgnoreParenCasts() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x3836948)
#13 0x00005781c5bcaabd 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
#14 0x00005781c5bc32a9 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
#15 0x00005781c5bce2d6 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00005781c5bbc1d5 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
#17 0x00005781c5bcafea 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
#18 0x00005781c5bcdaaa clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#19 0x00005781c5bd20ff 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
#20 0x00005781c5c80649 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x1ca0649)
#21 0x00005781c5724454 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#22 0x00005781c5fdf170 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x1fff170)
#23 0x00005781c62a30ec clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x22c30ec)
#24 0x00005781c5f9ecc9 clang::FrontendAction::Execute() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x1fbecc9)
#25 0x00005781c5f11575 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang-tidy+0x1f31575)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-aarch64-quick running on linaro-clang-aarch64-quick while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/tcwg-buildbot/worker/clang-aarch64-quick/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
clang-tidy: ../llvm/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x0000aaaab8efa0cc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x450d0cc)
 #1 0x0000aaaab8ef7f3c llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x450af3c)
 #2 0x0000aaaab8efa95c SignalHandler(int) Signals.cpp:0:0
 #3 0x0000ffff9854d598 (linux-vdso.so.1+0x598)
 #4 0x0000ffff980af200 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000ffff9806a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x0000ffff98057130 abort ./stdlib/abort.c:81:7
 #7 0x0000ffff98063fd0 __assert_fail_base ./assert/assert.c:89:7
 #8 0x0000ffff98064040 __assert_perror_fail ./assert/assert-perr.c:31:1
 #9 0x0000aaaab7312570 clang::IgnoreParensSingleStep(clang::Expr*) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x2925570)
#10 0x0000aaaab7e55070 clang::Expr::IgnoreParenCasts() (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x3468070)
#11 0x0000aaaab6509a04 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
#12 0x0000aaaab64ff010 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x0000aaaab651f624 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x0000aaaab64f8b80 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x0000aaaab64f5e88 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x0000aaaab64f6248 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 0x0000aaaab64f58a4 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x0000aaaab64f56ec 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
#19 0x0000aaaab65d5ed8 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x1be8ed8)
#20 0x0000aaaab610848c (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#21 0x0000aaaab6860d4c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x1e73d4c)
#22 0x0000aaaab6a6e370 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x2081370)
#23 0x0000aaaab681ef40 clang::FrontendAction::Execute() (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x1e31f40)
#24 0x0000aaaab67a2aec clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x1db5aec)
#25 0x0000aaaab60fc3bc clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/home/tcwg-buildbot/worker/clang-aarch64-quick/stage1/bin/clang-tidy+0x170f3bc)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building clang at step 6 "Add check check-clang".

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

Here is the relevant piece of the build log for the reference
Step 6 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/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: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00000000027214c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x27214c8)
 #1 0x000000000271ea0c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fadaf16b910 __restore_rt (/lib64/libpthread.so.0+0x16910)
 #3 0x00007fadaea99d2b raise (/lib64/libc.so.6+0x4ad2b)
 #4 0x00007fadaea9b3e5 abort (/lib64/libc.so.6+0x4c3e5)
 #5 0x00007fadaea91c6a __assert_fail_base (/lib64/libc.so.6+0x42c6a)
 #6 0x00007fadaea91cf2 (/lib64/libc.so.6+0x42cf2)
 #7 0x0000000005163216 clang::IgnoreParensSingleStep(clang::Expr*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x5163216)
 #8 0x0000000005be4b0a clang::Expr::IgnoreParenCasts() (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x5be4b0a)
 #9 0x00000000048668a5 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
#10 0x0000000004859f02 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::dataTraverseNode(clang::Stmt*, 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 0x0000000004861ffd 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.6931) UncountedLambdaCapturesChecker.cpp:0:0
#12 0x0000000004872c83 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 0x0000000004859627 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) (.part.6777) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x000000000487569c 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 0x0000000004859c6b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) (.part.6779) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x0000000004874dac 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 0x0000000004865d55 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 0x0000000004928e41 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x4928e41)
#19 0x000000000441b927 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#20 0x0000000004a87cd4 clang::ParseAST(clang::Sema&, bool, bool) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x4a87cd4)
#21 0x000000000322dca9 clang::FrontendAction::Execute() (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x322dca9)
#22 0x00000000031c052a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x31c052a)
#23 0x0000000003306057 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0x3306057)
#24 0x0000000000d724d0 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0xd724d0)
#25 0x0000000000d6a8e8 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#26 0x0000000000d6cd65 clang_main(int, char**, llvm::ToolContext const&) (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0xd6cd65)
#27 0x0000000000cb64a3 main (/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang+0xcb64a3)
#28 0x00007fadaea8424d __libc_start_main (/lib64/libc.so.6+0x3524d)
#29 0x0000000000d6a2ca _start /home/abuild/rpmbuild/BUILD/glibc-2.31/csu/../sysdeps/x86_64/start.S:122:0
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 260641 Aborted                 (core dumped) /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/clang -cc1 -internal-isystem /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder arc-builder running on arc-worker while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /buildbot/worker/arc-folder/build/bin/clang -cc1 -internal-isystem /buildbot/worker/arc-folder/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /buildbot/worker/arc-folder/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /buildbot/worker/arc-folder/build/bin/clang -cc1 -internal-isystem /buildbot/worker/arc-folder/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /buildbot/worker/arc-folder/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /buildbot/worker/arc-folder/llvm-project/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: /buildbot/worker/arc-folder/build/bin/clang -cc1 -internal-isystem /buildbot/worker/arc-folder/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /buildbot/worker/arc-folder/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x0000000001fc4b38 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/buildbot/worker/arc-folder/build/bin/clang+0x1fc4b38)
 #1 0x0000000001fc1f1c SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f2385483630 __restore_rt sigaction.c:0:0
 #3 0x00007f23841d33d7 raise (/usr/lib64/libc.so.6+0x363d7)
 #4 0x00007f23841d4ac8 abort (/usr/lib64/libc.so.6+0x37ac8)
 #5 0x00007f23841cc1a6 __assert_fail_base (/usr/lib64/libc.so.6+0x2f1a6)
 #6 0x00007f23841cc252 (/usr/lib64/libc.so.6+0x2f252)
 #7 0x0000000004e428b7 clang::IgnoreParensSingleStep(clang::Expr*) (/buildbot/worker/arc-folder/build/bin/clang+0x4e428b7)
 #8 0x00000000059ca3d0 clang::Expr::IgnoreParenCasts() (/buildbot/worker/arc-folder/build/bin/clang+0x59ca3d0)
 #9 0x0000000004462d9d 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
#10 0x000000000445ad79 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
#11 0x0000000004467346 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#12 0x0000000004455a8d 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
#13 0x0000000004468ecc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionTemplateDecl(clang::FunctionTemplateDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x000000000446328a 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
#15 0x0000000004466b46 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x000000000446a246 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
#17 0x000000000450e7c1 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/buildbot/worker/arc-folder/build/bin/clang+0x450e7c1)
#18 0x0000000003fd2262 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#19 0x000000000468969c clang::ParseAST(clang::Sema&, bool, bool) (/buildbot/worker/arc-folder/build/bin/clang+0x468969c)
#20 0x0000000002bbafe9 clang::FrontendAction::Execute() (/buildbot/worker/arc-folder/build/bin/clang+0x2bbafe9)
#21 0x0000000002b3211e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/buildbot/worker/arc-folder/build/bin/clang+0x2b3211e)
#22 0x0000000002c927be clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/buildbot/worker/arc-folder/build/bin/clang+0x2c927be)
#23 0x0000000000b42367 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/buildbot/worker/arc-folder/build/bin/clang+0xb42367)
#24 0x0000000000b39a5a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#25 0x0000000000b3d86d clang_main(int, char**, llvm::ToolContext const&) (/buildbot/worker/arc-folder/build/bin/clang+0xb3d86d)
#26 0x0000000000a6c4e4 main (/buildbot/worker/arc-folder/build/bin/clang+0xa6c4e4)
#27 0x00007f23841bf555 __libc_start_main (/usr/lib64/libc.so.6+0x22555)
#28 0x0000000000b391cd _start (/buildbot/worker/arc-folder/build/bin/clang+0xb391cd)
/buildbot/worker/arc-folder/build/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 12977 Aborted                 /buildbot/worker/arc-folder/build/bin/clang -cc1 -internal-isystem /buildbot/worker/arc-folder/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /buildbot/worker/arc-folder/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-m68k-linux-cross running on suse-gary-m68k-cross while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
clang-tidy: /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x00000000053e35fb llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x53e35fb)
 #1 0x00000000053e069b SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f51d6a41580 __restore_rt (/lib64/libc.so.6+0x41580)
 #3 0x00007f51d6a9a25c __pthread_kill_implementation (/lib64/libc.so.6+0x9a25c)
 #4 0x00007f51d6a414b6 gsignal (/lib64/libc.so.6+0x414b6)
 #5 0x00007f51d6a2891a abort (/lib64/libc.so.6+0x2891a)
 #6 0x00007f51d6a2882e _nl_load_domain.cold (/lib64/libc.so.6+0x2882e)
 #7 0x00007f51d6a392d6 (/lib64/libc.so.6+0x392d6)
 #8 0x000000000328e600 clang::IgnoreParensSingleStep(clang::Expr*) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x328e600)
 #9 0x0000000003e6127c clang::Expr::IgnoreParenCasts() (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x3e6127c)
#10 0x00000000021e95fd 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 0x00000000021de3ed 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 0x00000000021ea546 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 0x00000000021d9a83 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00000000021da5da clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x00000000021e6037 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00000000021ec695 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
#17 0x00000000022971d0 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x22971d0)
#18 0x0000000001d61eeb (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#19 0x0000000002600da0 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x2600da0)
#20 0x00000000028ee5ac clang::ParseAST(clang::Sema&, bool, bool) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x28ee5ac)
#21 0x00000000025c0439 clang::FrontendAction::Execute() (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x25c0439)
#22 0x0000000002536e6e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x2536e6e)
#23 0x0000000001d3463d clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x1d3463d)
#24 0x0000000001cc8fd4 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, bool, llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) ClangTidy.cpp:0:0
#25 0x0000000001d2bb0c clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/var/lib/buildbot/workers/suse-gary-m68k-cross/clang-m68k-linux-cross/stage1/bin/clang-tidy+0x1d2bb0c)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

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

Here is the relevant piece of the build log for the reference
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@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

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-gcc-ubuntu running on sie-linux-worker3 while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x0000564fd8ba481f llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x578c81f)
 #1 0x0000564fd8ba1d74 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007f3167473420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #3 0x0000564fd780f538 clang::Expr::IgnoreParenCasts() (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x43f7538)
 #4 0x0000564fd5a56c63 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
 #5 0x0000564fd5a4331b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::dataTraverseNode(clang::Stmt*, 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
 #6 0x0000564fd5a4b8f9 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
 #7 0x0000564fd5a5a048 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
 #8 0x0000564fd5a4213f 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
 #9 0x0000564fd5a42f93 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
#10 0x0000564fd5a65879 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#11 0x0000564fd5a6887e 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
#12 0x0000564fd5b35de1 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x271dde1)
#13 0x0000564fd5542c1e (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#14 0x0000564fd5e7f980 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x2a67980)
#15 0x0000564fd614374c clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x2d2b74c)
#16 0x0000564fd5e435c9 clang::FrontendAction::Execute() (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x2a2b5c9)
#17 0x0000564fd5db82de clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x29a02de)
#18 0x0000564fd55095a0 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x20f15a0)
#19 0x0000564fd54a73e9 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, bool, llvm::StringRef)::ActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) ClangTidy.cpp:0:0
#20 0x0000564fd5500517 clang::tooling::ToolInvocation::runInvocation(char const*, clang::driver::Compilation*, std::shared_ptr<clang::CompilerInvocation>, std::shared_ptr<clang::PCHContainerOperations>) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x20e8517)
#21 0x0000564fd5503dc8 clang::tooling::ToolInvocation::run() (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x20ebdc8)
#22 0x0000564fd55074b1 clang::tooling::ClangTool::run(clang::tooling::ToolAction*) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x20ef4b1)
#23 0x0000564fd54b8e96 clang::tidy::runClangTidy(clang::tidy::ClangTidyContext&, clang::tooling::CompilationDatabase const&, llvm::ArrayRef<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, llvm::IntrusiveRefCntPtr<llvm::vfs::OverlayFileSystem>, bool, bool, llvm::StringRef) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x20a0e96)
#24 0x0000564fd4593b2e clang::tidy::clangTidyMain(int, char const**) (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x117bb2e)
#25 0x00007f3166f21083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#26 0x0000564fd458992e _start (/home/buildbot/buildbot-root/llvm-clang-x86_64-gcc-ubuntu/build/bin/clang-tidy+0x117192e)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-armv8-quick running on linaro-clang-armv8-quick while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/tcwg-buildbot/worker/clang-armv8-quick/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
clang-tidy: ../llvm/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/tcwg-buildbot/worker/clang-armv8-quick/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
#0 0x04f3ecd4 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-tidy+0x447fcd4)
#1 0x04f3c4f4 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-armv8-quick/stage1/bin/clang-tidy+0x447d4f4)
#2 0x04f3f72c SignalHandler(int) Signals.cpp:0:0
#3 0xf7bbd6e0 __default_sa_restorer ./signal/../sysdeps/unix/sysv/linux/arm/sigrestorer.S:67:0
#4 0xf7badb06 ./csu/../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47:0
#5 0xf7bed292 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0xf7bbc840 gsignal ./signal/../sysdeps/posix/raise.c:27:6

--

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


@rniwa rniwa restored the trivial-lambdas-and-noescape branch October 31, 2024 07:27
rniwa added a commit that referenced this pull request Oct 31, 2024
…ons and [[clang::noescape]]." (#114372)

Reverts #113845. Introduced a test failure.
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-libc-amdgpu-runtime running on omp-vega20-1 while building clang at step 7 "Add check check-clang".

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

Here is the relevant piece of the build log for the reference
Step 7 (Add check check-clang) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 1: /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang -cc1 -internal-isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang -cc1 -internal-isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang -cc1 -internal-isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x0000556fb85cabef llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x2bbabef)
 #1 0x0000556fb85c8144 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fecd96ed420 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x14420)
 #3 0x0000556fbc3d7358 clang::Expr::IgnoreParenCasts() (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x69c7358)
 #4 0x0000556fbac38813 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
 #5 0x0000556fbac24eeb clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::dataTraverseNode(clang::Stmt*, 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
 #6 0x0000556fbac2d4c9 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
 #7 0x0000556fbac3bbf8 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
 #8 0x0000556fbac23d0f 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
 #9 0x0000556fbac2f8ef clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#10 0x0000556fbac47fbc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionTemplateDecl(clang::FunctionTemplateDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#11 0x0000556fbac24b63 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
#12 0x0000556fbac47429 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x0000556fbac4a41e 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
#14 0x0000556fbad174a1 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x53074a1)
#15 0x0000556fba71472e (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#16 0x0000556fbaea7b4c clang::ParseAST(clang::Sema&, bool, bool) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x5497b4c)
#17 0x0000556fb923cd99 clang::FrontendAction::Execute() (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x382cd99)
#18 0x0000556fb91b959e clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x37a959e)
#19 0x0000556fb9329696 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0x3919696)
#20 0x0000556fb6958b85 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0xf48b85)
#21 0x0000556fb69508fa ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#22 0x0000556fb6954807 clang_main(int, char**, llvm::ToolContext const&) (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0xf44807)
#23 0x0000556fb6879ebb main (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0xe69ebb)
#24 0x00007fecd919b083 __libc_start_main /build/glibc-LcI20x/glibc-2.31/csu/../csu/libc-start.c:342:3
#25 0x0000556fb695038e _start (/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang+0xf4038e)
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 1519700 Segmentation fault      (core dumped) /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/bin/clang -cc1 -internal-isystem /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-debian-cpp20 running on clang-debian-cpp20 while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang -cc1 -internal-isystem /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang -cc1 -internal-isystem /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang -cc1 -internal-isystem /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00005cacb1ec9e78 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x3b8be78)
 #1 0x00005cacb1ec78ed llvm::sys::RunSignalHandlers() (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x3b898ed)
 #2 0x00005cacb1eca3f8 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007a7b94b95510 (/lib/x86_64-linux-gnu/libc.so.6+0x3c510)
 #4 0x00007a7b94be30fc (/lib/x86_64-linux-gnu/libc.so.6+0x8a0fc)
 #5 0x00007a7b94b95472 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3c472)
 #6 0x00007a7b94b7f4b2 abort (/lib/x86_64-linux-gnu/libc.so.6+0x264b2)
 #7 0x00007a7b94b7f3d5 (/lib/x86_64-linux-gnu/libc.so.6+0x263d5)
 #8 0x00007a7b94b8e3a2 (/lib/x86_64-linux-gnu/libc.so.6+0x353a2)
 #9 0x00005cacb49d823e clang::IgnoreParensSingleStep(clang::Expr*) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x669a23e)
#10 0x00005cacb55192cb clang::Expr::IgnoreParenCasts() (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x71db2cb)
#11 0x00005cacb4082a2e 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
#12 0x00005cacb407805c 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x00005cacb4097918 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00005cacb4072a92 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x00005cacb40701bc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00005cacb406fce9 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#17 0x00005cacb409253b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x00005cacb407068f clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#19 0x00005cacb406fe0f clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#20 0x00005cacb406fb9f 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
#21 0x00005cacb414a321 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x5e0c321)
#22 0x00005cacb3c6f527 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#23 0x00005cacb4279849 clang::ParseAST(clang::Sema&, bool, bool) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x5f3b849)
#24 0x00005cacb293e43f clang::FrontendAction::Execute() (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x460043f)
#25 0x00005cacb28b289d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x457489d)
#26 0x00005cacb2a1c6a7 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x46de6a7)
#27 0x00005cacaf6fe49e cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x13c049e)
#28 0x00005cacaf6fab8e ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#29 0x00005cacaf6f9b8e clang_main(int, char**, llvm::ToolContext const&) (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x13bbb8e)
#30 0x00005cacaf7098b7 main (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x13cb8b7)
#31 0x00007a7b94b806ca (/lib/x86_64-linux-gnu/libc.so.6+0x276ca)
#32 0x00007a7b94b80785 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27785)
#33 0x00005cacaf6f86e1 _start (/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang+0x13ba6e1)
/vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 1315989 Aborted                 /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/bin/clang -cc1 -internal-isystem /vol/worker/clang-debian-cpp20/clang-debian-cpp20/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /vol/worker/clang-debian-cpp20/clang-debian-cpp20/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder fuchsia-x86_64-linux running on fuchsia-debian-64-us-central1-a-1 while building clang at step 4 "annotate".

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

Here is the relevant piece of the build log for the reference
Step 4 (annotate) failure: 'python ../llvm-zorg/zorg/buildbot/builders/annotated/fuchsia-linux.py ...' (failure)
...
[1336/1338] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
[1337/1338] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/wasm-ld
-- Testing: 21395 tests, 60 workers --
Testing:  0
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (793 of 21395)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 1: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 1462276 Segmentation fault      (core dumped) /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp


Testing Time: 77.13s

Total Discovered Tests: 45505
  Skipped          :     8 (0.02%)
  Unsupported      :   874 (1.92%)
  Passed           : 44597 (98.00%)
  Expectedly Failed:    25 (0.05%)
  Failed           :     1 (0.00%)
FAILED: tools/clang/test/CMakeFiles/check-clang /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test/CMakeFiles/check-clang 
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/./bin/llvm-lit -sv --param USE_Z3_SOLVER=0 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test
ninja: build stopped: subcommand failed.
['ninja', '-C', '/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4', 'check-llvm', 'check-clang', 'check-lld'] exited with return code 1.
@@@STEP_FAILURE@@@
Step 7 (check) failure: check (failure)
...
[1336/1338] Linking CXX executable tools/clang/unittests/Tooling/ToolingTests
[1337/1338] Running the Clang regression tests
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using clang: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/subst.py:126: note: Did not find clang-repl in /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin:/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/ld.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/lld-link
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/ld64.lld
llvm-lit: /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/wasm-ld
-- Testing: 21395 tests, 60 workers --
Testing:  0
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (793 of 21395)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 139

Command Output (stderr):
--
RUN: at line 1: /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 1462276 Segmentation fault      (core dumped) /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/bin/clang -cc1 -internal-isystem /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /var/lib/buildbot/fuchsia-x86_64-linux/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70.. 80.. 90.. 
********************
Failed Tests (1):
  Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp


Testing Time: 77.13s

Total Discovered Tests: 45505
  Skipped          :     8 (0.02%)
  Unsupported      :   874 (1.92%)
  Passed           : 44597 (98.00%)
  Expectedly Failed:    25 (0.05%)
  Failed           :     1 (0.00%)
FAILED: tools/clang/test/CMakeFiles/check-clang /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test/CMakeFiles/check-clang 
cd /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test && /usr/bin/python3.10 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/./bin/llvm-lit -sv --param USE_Z3_SOLVER=0 /var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4/tools/clang/test
ninja: build stopped: subcommand failed.
['ninja', '-C', '/var/lib/buildbot/fuchsia-x86_64-linux/build/llvm-build-c0iok4_4', 'check-llvm', 'check-clang', 'check-lld'] exited with return code 1.
program finished with exit code 0
elapsedTime=1103.168713

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-solaris11-sparcv9 running on solaris11-sparcv9 while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
Assertion failed: detail::isPresent(Val) && "dyn_cast on a non-existent value", file /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/llvm/llvm/include/llvm/Support/Casting.h, line 662
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /opt/llvm-buildbot/home/solaris11-sparcv9/clang-solaris11-sparcv9/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  clang-tidy 0x0000000105fc04d0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 36
1  clang-tidy 0x0000000105fc0e24 SignalHandler(int) + 896
2  libc.so.1  0xffffffff7dfc6368 __sighndlr + 12
3  libc.so.1  0xffffffff7dfb8c10 call_user_handler + 1024
4  libc.so.1  0xffffffff7dfb9000 sigacthandler + 208
5  libc.so.1  0xffffffff7dfcb480 __lwp_sigqueue + 8
6  libc.so.1  0xffffffff7dee953c abort + 252
7  libc.so.1  0xffffffff7deea370 _assert + 96
8  clang-tidy 0x0000000103e92040 clang::IgnoreParensSingleStep(clang::Expr*) + 628
9  clang-tidy 0x0000000104c1e6c0 clang::Expr::IgnoreParenCasts() + 8
10 clang-tidy 0x0000000102d566e0 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*>>>>*) + 252
11 clang-tidy 0x0000000102d4af7c 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*>>>>*) + 7620
12 clang-tidy 0x0000000102d6eda8 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) + 1468
13 clang-tidy 0x0000000102d41a84 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) + 12
14 clang-tidy 0x0000000102d3dcb4 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) + 2032
15 clang-tidy 0x0000000102d3e7dc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) + 524
16 clang-tidy 0x0000000102d3dfa0 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) + 2780
17 clang-tidy 0x0000000102d3d460 void clang::ento::check::ASTDecl<clang::TranslationUnitDecl>::_checkDecl<(anonymous namespace)::UncountedLambdaCapturesChecker>(void*, clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) + 76
18 clang-tidy 0x0000000102e4628c clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) + 464
19 clang-tidy 0x000000010284eae4 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) + 520
20 clang-tidy 0x0000000103155968 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 36
21 clang-tidy 0x000000010340814c clang::ParseAST(clang::Sema&, bool, bool) + 720
22 clang-tidy 0x00000001030f83e4 clang::ASTFrontendAction::ExecuteAction() + 248
23 clang-tidy 0x00000001030f7b24 clang::FrontendAction::Execute() + 92
24 clang-tidy 0x0000000103056f44 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1628
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-linux-test-suite running on ppc64le-clang-test-suite while building clang at step 6 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/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: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00000000140092a0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x140092a0)
 #1 0x00000000140062e4 SignalHandler(int) Signals.cpp:0:0
 #2 0x00007fff8aad04d8 (linux-vdso64.so.1+0x4d8)
 #3 0x00007fff8a36a448 raise (/lib64/libc.so.6+0x4a448)
 #4 0x00007fff8a344a54 abort (/lib64/libc.so.6+0x24a54)
 #5 0x00007fff8a35dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #6 0x00007fff8a35dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
 #7 0x00000000175a1f94 clang::IgnoreParensSingleStep(clang::Expr*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x175a1f94)
 #8 0x00000000184240c4 clang::Expr::IgnoreParenCasts() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x184240c4)
 #9 0x00000000169bfc84 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
#10 0x00000000169ae888 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::dataTraverseNode(clang::Stmt*, 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 0x00000000169b981c 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.6967) UncountedLambdaCapturesChecker.cpp:0:0
#12 0x00000000169d3f7c 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 0x00000000169ac48c clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) (.part.6818) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00000000169d8afc 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 0x00000000169adfac clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) (.part.6820) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00000000169d8038 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 0x00000000169bedb0 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 0x0000000016ad42c4 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x16ad42c4)
#19 0x00000000164294e4 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#20 0x0000000016c845f4 clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x16c845f4)
#21 0x0000000014d3cb88 clang::ASTFrontendAction::ExecuteAction() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x14d3cb88)
#22 0x0000000014d436c8 clang::FrontendAction::Execute() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x14d436c8)
#23 0x0000000014ccaa70 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x14ccaa70)
#24 0x0000000014e53758 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x14e53758)
#25 0x00000000108165cc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x108165cc)
#26 0x000000001080c920 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#27 0x0000000010810648 clang_main(int, char**, llvm::ToolContext const&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x10810648)
#28 0x000000001070eb34 main (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang+0x1070eb34)
#29 0x00007fff8a34a96c generic_start_main.isra.0 (/lib64/libc.so.6+0x2a96c)
#30 0x00007fff8a34ab04 __libc_start_main (/lib64/libc.so.6+0x2ab04)
/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1: 130649 Aborted                 (core dumped) /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/bin/clang -cc1 -internal-isystem /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/build/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-test-suite/clang-ppc64le-test-suite/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-aarch64-global-isel running on linaro-clang-aarch64-global-isel while building clang at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/tcwg-buildbot/worker/clang-aarch64-global-isel/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
clang-tidy: ../llvm/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x0000aaaaedb41290 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x4bf9290)
 #1 0x0000aaaaedb3f100 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x4bf7100)
 #2 0x0000aaaaedb41b20 SignalHandler(int) Signals.cpp:0:0
 #3 0x0000ffffb7721598 (linux-vdso.so.1+0x598)
 #4 0x0000ffffb728f200 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x0000ffffb724a67c gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #6 0x0000ffffb7237130 abort ./stdlib/abort.c:81:7
 #7 0x0000ffffb7243fd0 __assert_fail_base ./assert/assert.c:89:7
 #8 0x0000ffffb7244040 __assert_perror_fail ./assert/assert-perr.c:31:1
 #9 0x0000aaaaebf5cdb4 clang::IgnoreParensSingleStep(clang::Expr*) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x3014db4)
#10 0x0000aaaaeca9f560 clang::Expr::IgnoreParenCasts() (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x3b57560)
#11 0x0000aaaaeb154f58 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
#12 0x0000aaaaeb14a564 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x0000aaaaeb16ab78 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x0000aaaaeb1440d4 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x0000aaaaeb1413dc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x0000aaaaeb14179c 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 0x0000aaaaeb140df8 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x0000aaaaeb140c40 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
#19 0x0000aaaaeb22142c clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x22d942c)
#20 0x0000aaaaead53c44 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#21 0x0000aaaaeb4ac094 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x2564094)
#22 0x0000aaaaeb6b9154 clang::ParseAST(clang::Sema&, bool, bool) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x2771154)
#23 0x0000aaaaeb46a288 clang::FrontendAction::Execute() (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x2522288)
#24 0x0000aaaaeb3ede34 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x24a5e34)
#25 0x0000aaaaead47b74 clang::tooling::FrontendActionFactory::runInvocation(std::shared_ptr<clang::CompilerInvocation>, clang::FileManager*, std::shared_ptr<clang::PCHContainerOperations>, clang::DiagnosticConsumer*) (/home/tcwg-buildbot/worker/clang-aarch64-global-isel/stage1/bin/clang-tidy+0x1dffb74)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

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

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

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:506: 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:506: 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:506: 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:506: 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:506: 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:506: 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:506: 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: 86707 of 86708 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp (22815 of 86707)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37 

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (25690 of 86707)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' 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 -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /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 -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37 

--
Step 10 (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:506: 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:506: 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:506: 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:506: 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:506: 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:506: 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:506: 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: 86707 of 86708 tests, 88 workers --
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp (22815 of 86707)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/b/sanitizer-x86_64-linux-fast/build/llvm_build_asan_ubsan/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37 

--

********************
Testing:  0.. 10.. 20.. 30.. 40.. 50.. 60.. 70
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (25690 of 86707)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' 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 -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /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 -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/b/sanitizer-x86_64-linux-fast/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37 

--

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building clang at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /build/buildbot/premerge-monolithic-linux/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy '-checks=-*,clang-analyzer-*' /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
clang-tidy: /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /build/buildbot/premerge-monolithic-linux/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x000059c0904afda8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:723:13
 #1 0x000059c0904ad85e llvm::sys::RunSignalHandlers() /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Signals.cpp:106:18
 #2 0x000059c0904b05c8 SignalHandler(int) /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #3 0x000078c2c2cd5520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000078c2c2d299fc pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0x969fc)
 #5 0x000078c2c2cd5476 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x42476)
 #6 0x000078c2c2cbb7f3 abort (/lib/x86_64-linux-gnu/libc.so.6+0x287f3)
 #7 0x000078c2c2cbb71b (/lib/x86_64-linux-gnu/libc.so.6+0x2871b)
 #8 0x000078c2c2ccce96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
 #9 0x000059c0906639fe clang::IgnoreParensSingleStep(clang::Expr*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:0:0
#10 0x000059c090663a5b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:30
#11 0x000059c090663a5b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:10
#12 0x000059c090663a5b IgnoreExprNodes<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/IgnoreExpr.h:38:9
#13 0x000059c090663a5b clang::Expr::IgnoreParenCasts() /build/buildbot/premerge-monolithic-linux/llvm-project/clang/lib/AST/Expr.cpp:3084:10
#14 0x000059c091ded89e isPresent /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:622:55
#15 0x000059c091ded89e isPresent<clang::Expr *> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:630:10
#16 0x000059c091ded89e dyn_cast_if_present<clang::LambdaExpr, clang::Expr> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:751:8
#17 0x000059c091ded89e dyn_cast_or_null<clang::LambdaExpr, clang::Expr> /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/include/llvm/Support/Casting.h:768:10
#18 0x000059c091ded89e VisitDeclRefExpr /build/buildbot/premerge-monolithic-linux/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:59:19
#19 0x000059c091ded89e WalkUpFromDeclRefExpr /build/buildbot/premerge-monolithic-linux/build/tools/clang/include/clang/AST/StmtNodes.inc:474:1
#20 0x000059c091ded89e 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*>>>>*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
#21 0x000059c091de2efc 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*>>>>*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
#22 0x000059c091e02873 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
#23 0x000059c091ddd902 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
#24 0x000059c091ddb00c clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /build/buildbot/premerge-monolithic-linux/build/tools/clang/include/clang/AST/DeclNodes.inc:0:1
#25 0x000059c091ddb54b TraverseDeclContextHelper /build/buildbot/premerge-monolithic-linux/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1543:7
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-ppc64le-rhel running on ppc64le-clang-rhel-test while building clang at step 7 "test-build-unified-tree-check-all".

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

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
clang-tidy: /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
 #0 0x0000775240573dcc llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libLLVMSupport.so.20.0git+0x273dcc)
 #1 0x0000775240574514 PrintStackTraceSignalHandler(void*) Signals.cpp:0:0
 #2 0x0000775240570f70 llvm::sys::RunSignalHandlers() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libLLVMSupport.so.20.0git+0x270f70)
 #3 0x00007752405747fc SignalHandler(int) Signals.cpp:0:0
 #4 0x0000775246df04c8 (linux-vdso64.so.1+0x4c8)
 #5 0x000077523fd7a448 raise (/lib64/libc.so.6+0x4a448)
 #6 0x000077523fd54a54 abort (/lib64/libc.so.6+0x24a54)
 #7 0x000077523fd6dc30 __assert_fail_base (/lib64/libc.so.6+0x3dc30)
 #8 0x000077523fd6dcd4 __assert_fail (/lib64/libc.so.6+0x3dcd4)
 #9 0x00007752417c7520 clang::IgnoreParensSingleStep(clang::Expr*) Expr.cpp:0:0
#10 0x00007752417c7588 clang::Expr::IgnoreParenCasts() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangAST.so.20.0git+0x8c7588)
#11 0x000077523f1d923c 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
#12 0x000077523f1cb150 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x000077523f1f4840 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x000077523f1c3534 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x000077523f1bf698 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x000077523f1bfccc 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 0x000077523f1bf1fc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x000077523f1bef90 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
#19 0x000077523d4e731c clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangStaticAnalyzerCore.so.20.0git+0x1b731c)
#20 0x000077523d6bd198 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#21 0x000077523d28a0d8 clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangFrontend.so.20.0git+0x25a0d8)
#22 0x0000775239e2b9e0 clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangParse.so.20.0git+0x7b9e0)
#23 0x000077523d235f38 clang::ASTFrontendAction::ExecuteAction() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangFrontend.so.20.0git+0x205f38)
#24 0x000077523d2354ec clang::FrontendAction::Execute() (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangFrontend.so.20.0git+0x2054ec)
#25 0x000077523d18d0b0 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbots/llvm-external-buildbots/workers/ppc64le-clang-rhel-test/clang-ppc64le-rhel/build/lib/libclangFrontend.so.20.0git+0x15d0b0)
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

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

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

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-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/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: 86705 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (791 of 86705)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00005f89b958f4c2 ___interceptor_backtrace /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:4423:13
 #1 0x00005f89c0b031ff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:13
 #2 0x00005f89c0afcb83 llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Signals.cpp:0:5
 #3 0x00005f89c0b0423b SignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x00005f89b95c1f99 ~ScopedThreadLocalStateBackup /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan.h:352:37
 #5 0x00005f89b95c1f99 SignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1124:1
 #6 0x00007b9d38245250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #7 0x00007b9d382a3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #8 0x00007b9d3824519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #9 0x00007b9d38228902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
#10 0x00007b9d3822881e (/lib/x86_64-linux-gnu/libc.so.6+0x2881e)
#11 0x00007b9d3823b7c7 (/lib/x86_64-linux-gnu/libc.so.6+0x3b7c7)
#12 0x00005f89c8b0a05b clang::IgnoreParensSingleStep(clang::Expr*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:0:0
#13 0x00005f89ca68cf4b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:30
#14 0x00005f89ca68cf4b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:10
#15 0x00005f89ca68cf4b IgnoreExprNodes<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:38:9
#16 0x00005f89ca68cf4b clang::Expr::IgnoreParenCasts() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/AST/Expr.cpp:3084:10
#17 0x00005f89c7058098 VisitDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:0:37
#18 0x00005f89c7058098 WalkUpFromDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/StmtNodes.inc:474:1
#19 0x00005f89c7058098 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
#20 0x00005f89c7040322 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
#21 0x00005f89c7087292 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
#22 0x00005f89c7030c2d clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
#23 0x00005f89c7029c54 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/DeclNodes.inc:238:1
#24 0x00005f89c702926b TraverseFunctionTemplateDecl /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1948:1
#25 0x00005f89c702926b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/DeclNodes.inc:518:1
Step 10 (stage2/msan check) failure: stage2/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/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: 86705 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (791 of 86705)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00005f89b958f4c2 ___interceptor_backtrace /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/../sanitizer_common/sanitizer_common_interceptors.inc:4423:13
 #1 0x00005f89c0b031ff llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:0:13
 #2 0x00005f89c0afcb83 llvm::sys::RunSignalHandlers() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Signals.cpp:0:5
 #3 0x00005f89c0b0423b SignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/lib/Support/Unix/Signals.inc:413:1
 #4 0x00005f89b95c1f99 ~ScopedThreadLocalStateBackup /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan.h:352:37
 #5 0x00005f89b95c1f99 SignalHandler(int) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1124:1
 #6 0x00007b9d38245250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #7 0x00007b9d382a3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #8 0x00007b9d3824519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #9 0x00007b9d38228902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
#10 0x00007b9d3822881e (/lib/x86_64-linux-gnu/libc.so.6+0x2881e)
#11 0x00007b9d3823b7c7 (/lib/x86_64-linux-gnu/libc.so.6+0x3b7c7)
#12 0x00005f89c8b0a05b clang::IgnoreParensSingleStep(clang::Expr*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:0:0
#13 0x00005f89ca68cf4b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:30
#14 0x00005f89ca68cf4b IgnoreExprNodesImpl<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:26:10
#15 0x00005f89ca68cf4b IgnoreExprNodes<clang::Expr *(&)(clang::Expr *), clang::Expr *(&)(clang::Expr *)> /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/IgnoreExpr.h:38:9
#16 0x00005f89ca68cf4b clang::Expr::IgnoreParenCasts() /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/AST/Expr.cpp:3084:10
#17 0x00005f89c7058098 VisitDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:0:37
#18 0x00005f89c7058098 WalkUpFromDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/StmtNodes.inc:474:1
#19 0x00005f89c7058098 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
#20 0x00005f89c7040322 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
#21 0x00005f89c7087292 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
#22 0x00005f89c7030c2d clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
#23 0x00005f89c7029c54 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/DeclNodes.inc:238:1
#24 0x00005f89c702926b TraverseFunctionTemplateDecl /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1948:1
#25 0x00005f89c702926b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build_msan/tools/clang/include/clang/AST/DeclNodes.inc:518:1
Step 13 (stage3/msan check) failure: stage3/msan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-msan/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: 83828 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (754 of 83828)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00005ca3569bc2e8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0x83bc2e8)
 #1 0x00005ca3569b9d9e llvm::sys::RunSignalHandlers() (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0x83b9d9e)
 #2 0x00005ca3569bc978 SignalHandler(int) Signals.cpp:0:0
 #3 0x00007c6a05a45250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #4 0x00007c6a05aa3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #5 0x00007c6a05a4519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #6 0x00007c6a05a28902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
 #7 0x00007c6a05a2881e (/lib/x86_64-linux-gnu/libc.so.6+0x2881e)
 #8 0x00007c6a05a3b7c7 (/lib/x86_64-linux-gnu/libc.so.6+0x3b7c7)
 #9 0x00005ca3596914ae clang::IgnoreParensSingleStep(clang::Expr*) SemaInit.cpp:0:0
#10 0x00005ca35a01c53b clang::Expr::IgnoreParenCasts() (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0xba1c53b)
#11 0x00005ca358d3813e 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
#12 0x00005ca358d2edab 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x00005ca358d4769a clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00005ca358d294c2 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x00005ca358d27265 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00005ca358d26c57 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#17 0x00005ca358d466cb clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x00005ca358d2757a clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#19 0x00005ca358d26d7c clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#20 0x00005ca358d26b0f 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
#21 0x00005ca358de1ba2 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0xa7e1ba2)
#22 0x00005ca35898abe3 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#23 0x00005ca358ee7b29 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0xa8e7b29)
#24 0x00005ca35764856f clang::FrontendAction::Execute() (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0x904856f)
#25 0x00005ca3575be90d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/b/sanitizer-x86_64-linux-bootstrap-msan/build/llvm_build2_msan/bin/clang+0x8fbe90d)

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder reverse-iteration running on hexagon-build-03 while building clang at step 6 "check_all".

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

Here is the relevant piece of the build log for the reference
Step 6 (check_all) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x00000000035be487 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x35be487)
 #1 0x00000000035bc15e llvm::sys::RunSignalHandlers() (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x35bc15e)
 #2 0x00000000035beb3f SignalHandler(int) Signals.cpp:0:0
 #3 0x00007f269b77d980 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x12980)
 #4 0x00007f269a2cbfb7 raise (/lib/x86_64-linux-gnu/libc.so.6+0x3efb7)
 #5 0x00007f269a2cd921 abort (/lib/x86_64-linux-gnu/libc.so.6+0x40921)
 #6 0x00007f269a2bd48a (/lib/x86_64-linux-gnu/libc.so.6+0x3048a)
 #7 0x00007f269a2bd502 (/lib/x86_64-linux-gnu/libc.so.6+0x30502)
 #8 0x00000000061da265 clang::IgnoreParensSingleStep(clang::Expr*) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x61da265)
 #9 0x0000000006c93a10 clang::Expr::IgnoreParenCasts() (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x6c93a10)
#10 0x000000000590677e clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::dataTraverseNode(clang::Stmt*, 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 0x00000000058fe14d 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#12 0x000000000591612c 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 0x00000000058fa9e4 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x00000000058f92db clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x0000000005910bbb clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x00000000058fc0c0 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#17 0x00000000058f917c 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 0x00000000059a8d90 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x59a8d90)
#19 0x0000000005561a9b (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#20 0x0000000005ad3767 clang::ParseAST(clang::Sema&, bool, bool) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x5ad3767)
#21 0x0000000004090410 clang::FrontendAction::Execute() (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x4090410)
#22 0x0000000004012fff clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x4012fff)
#23 0x000000000415a6af clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0x415a6af)
#24 0x0000000000c74853 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0xc74853)
#25 0x0000000000c71091 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#26 0x0000000000c705f1 clang_main(int, char**, llvm::ToolContext const&) (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0xc705f1)
#27 0x0000000000c7f207 main (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0xc7f207)
#28 0x00007f269a2aebf7 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21bf7)
#29 0x0000000000c6eb8a _start (/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang+0xc6eb8a)
/local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/tools/clang/test/Analysis/Checkers/WebKit/Output/uncounted-lambda-captures.cpp.script: line 1:  1103 Aborted                 /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/bin/clang -cc1 -internal-isystem /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.obj/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /local/mnt/workspace/bots/hexagon-build-03/reverse-iteration/llvm.src/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

LLVM Buildbot has detected a new failure on builder clang-armv7-global-isel running on linaro-clang-armv7-global-isel while building clang at step 7 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
******************** TEST 'Clang Tools :: clang-tidy/infrastructure/read_file_config.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 2: mkdir -p /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
+ mkdir -p /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/
RUN: at line 3: cp /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ cp /home/tcwg-buildbot/worker/clang-armv7-global-isel/llvm/clang-tools-extra/test/clang-tidy/infrastructure/read_file_config.cpp /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 4: echo 'Checks: "-*,modernize-use-nullptr"' > /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/.clang-tidy
+ echo 'Checks: "-*,modernize-use-nullptr"'
RUN: at line 5: echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]' > /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/compile_commands.json
+ echo '[{"command": "cc -c -o test.o test.cpp", "directory": "/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config", "file": "/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp"}]'
RUN: at line 6: clang-tidy /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | not grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ not grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
+ clang-tidy /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
RUN: at line 7: clang-tidy -checks="-*,clang-analyzer-*" /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp | grep "warning: .*\[clang-analyzer-deadcode.DeadStores\]$"
+ clang-tidy '-checks=-*,clang-analyzer-*' /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
+ grep 'warning: .*\[clang-analyzer-deadcode.DeadStores\]$'
clang-tidy: ../llvm/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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.
Stack dump:
0.	Program arguments: clang-tidy -checks=-*,clang-analyzer-* /home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/read-file-config/test.cpp
1.	<eof> parser at end of file
#0 0x052b4e94 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang-tidy+0x4ad2e94)
#1 0x052b26b4 llvm::sys::RunSignalHandlers() (/home/tcwg-buildbot/worker/clang-armv7-global-isel/stage1/bin/clang-tidy+0x4ad06b4)
#2 0x052b58ec SignalHandler(int) Signals.cpp:0:0
#3 0xf760d6e0 __default_sa_restorer ./signal/../sysdeps/unix/sysv/linux/arm/sigrestorer.S:67:0
#4 0xf75fdb06 ./csu/../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47:0
#5 0xf763d292 __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
#6 0xf760c840 gsignal ./signal/../sysdeps/posix/raise.c:27:6

--

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


@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 31, 2024

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

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

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-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-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 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86708 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (834 of 86708)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
    #0 0x62dce19c5002 in VisitDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37
    #1 0x62dce19c5002 in WalkUpFromDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/StmtNodes.inc:474:1
    #2 0x62dce19c5002 in 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
    #3 0x62dce19b3a68 in 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
    #4 0x62dce19e9e08 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
    #5 0x62dce19ad5f4 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
    #6 0x62dce19a991a in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:238:1
    #7 0x62dce19a91f6 in TraverseFunctionTemplateDecl /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1948:1
    #8 0x62dce19a91f6 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:518:1
    #9 0x62dce19dd36a in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1543:7
    #10 0x62dce19a9e86 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1643:1
    #11 0x62dce19a929c in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:24:1
    #12 0x62dce19a9024 in checkASTDecl /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:121:13
    #13 0x62dce19a9024 in void clang::ento::check::ASTDecl<clang::TranslationUnitDecl>::_checkDecl<(anonymous namespace)::UncountedLambdaCapturesChecker>(void*, clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h:33:33
    #14 0x62dce1b0683c in operator() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:72:12
    #15 0x62dce1b0683c in clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:80:5
    #16 0x62dce1383458 in runAnalysisOnTranslationUnit /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:534:15
    #17 0x62dce1383458 in (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:613:3
    #18 0x62dce1c9bb6e in clang::ParseAST(clang::Sema&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Parse/ParseAST.cpp:184:13
    #19 0x62dcdf611bf6 in clang::FrontendAction::Execute() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1077:8
    #20 0x62dcdf57db0f in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1060:33
    #21 0x62dcdf7658a5 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:296:25
    #22 0x62dcdab608ad in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/cc1_main.cpp:285:15
    #23 0x62dcdab5af82 in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:217:12
    #24 0x62dcdab59d60 in clang_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:258:12
    #25 0x62dcdab6ff1a in main /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/tools/driver/clang-driver.cpp:17:10
    #26 0x7ca31c62a3b7  (/lib/x86_64-linux-gnu/libc.so.6+0x2a3b7) (BuildId: 5f3f024b472f38389da3a2f567b3d0eaa8835ca2)
    #27 0x7ca31c62a47a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a47a) (BuildId: 5f3f024b472f38389da3a2f567b3d0eaa8835ca2)
    #28 0x62dcdab2b3a4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang-20+0xb2e03a4)

Step 10 (stage2/ubsan check) failure: stage2/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-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 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 86708 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (834 of 86708)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37: runtime error: member call on null pointer of type 'clang::Expr'
    #0 0x62dce19c5002 in VisitDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:58:37
    #1 0x62dce19c5002 in WalkUpFromDeclRefExpr /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/StmtNodes.inc:474:1
    #2 0x62dce19c5002 in 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2487:1
    #3 0x62dce19b3a68 in 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*>>>>*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:687:7
    #4 0x62dce19e9e08 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2264:5
    #5 0x62dce19ad5f4 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:2275:1
    #6 0x62dce19a991a in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:238:1
    #7 0x62dce19a91f6 in TraverseFunctionTemplateDecl /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1948:1
    #8 0x62dce19a91f6 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:518:1
    #9 0x62dce19dd36a in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1543:7
    #10 0x62dce19a9e86 in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/AST/RecursiveASTVisitor.h:1643:1
    #11 0x62dce19a929c in clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/include/clang/AST/DeclNodes.inc:24:1
    #12 0x62dce19a9024 in checkASTDecl /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/UncountedLambdaCapturesChecker.cpp:121:13
    #13 0x62dce19a9024 in void clang::ento::check::ASTDecl<clang::TranslationUnitDecl>::_checkDecl<(anonymous namespace)::UncountedLambdaCapturesChecker>(void*, clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/StaticAnalyzer/Core/Checker.h:33:33
    #14 0x62dce1b0683c in operator() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h:72:12
    #15 0x62dce1b0683c in clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp:80:5
    #16 0x62dce1383458 in runAnalysisOnTranslationUnit /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:534:15
    #17 0x62dce1383458 in (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp:613:3
    #18 0x62dce1c9bb6e in clang::ParseAST(clang::Sema&, bool, bool) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Parse/ParseAST.cpp:184:13
    #19 0x62dcdf611bf6 in clang::FrontendAction::Execute() /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1077:8
    #20 0x62dcdf57db0f in clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1060:33
    #21 0x62dcdf7658a5 in clang::ExecuteCompilerInvocation(clang::CompilerInstance*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:296:25
    #22 0x62dcdab608ad in cc1_main(llvm::ArrayRef<char const*>, char const*, void*) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/cc1_main.cpp:285:15
    #23 0x62dcdab5af82 in ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:217:12
    #24 0x62dcdab59d60 in clang_main(int, char**, llvm::ToolContext const&) /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/tools/driver/driver.cpp:258:12
    #25 0x62dcdab6ff1a in main /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/tools/clang/tools/driver/clang-driver.cpp:17:10
    #26 0x7ca31c62a3b7  (/lib/x86_64-linux-gnu/libc.so.6+0x2a3b7) (BuildId: 5f3f024b472f38389da3a2f567b3d0eaa8835ca2)
    #27 0x7ca31c62a47a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2a47a) (BuildId: 5f3f024b472f38389da3a2f567b3d0eaa8835ca2)
    #28 0x62dcdab2b3a4 in _start (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build_ubsan/bin/clang-20+0xb2e03a4)

Step 13 (stage3/ubsan check) failure: stage3/ubsan check (failure)
...
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using lld-link: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/lld-link
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using ld64.lld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/ld64.lld
llvm-lit: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/utils/lit/lit/llvm/config.py:506: note: using wasm-ld: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/wasm-ld
llvm-lit: /home/b/sanitizer-x86_64-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 900 seconds was requested on the command line. Forcing timeout to be 900 seconds.
-- Testing: 83828 tests, 88 workers --
Testing: 
FAIL: Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp (725 of 83828)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
RUN: at line 1: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
+ /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
clang: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/Support/Casting.h:662: decltype(auto) llvm::dyn_cast(From *) [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: /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang -cc1 -internal-isystem /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/lib/clang/20/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=webkit.UncountedLambdaCapturesChecker -verify /home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm-project/clang/test/Analysis/Checkers/WebKit/uncounted-lambda-captures.cpp
1.	<eof> parser at end of file
 #0 0x000060cf843a2068 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0x83bd068)
 #1 0x000060cf8439fb1e llvm::sys::RunSignalHandlers() (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0x83bab1e)
 #2 0x000060cf843a26f8 SignalHandler(int) Signals.cpp:0:0
 #3 0x000071705b445250 (/lib/x86_64-linux-gnu/libc.so.6+0x45250)
 #4 0x000071705b4a3f1c pthread_kill (/lib/x86_64-linux-gnu/libc.so.6+0xa3f1c)
 #5 0x000071705b44519e raise (/lib/x86_64-linux-gnu/libc.so.6+0x4519e)
 #6 0x000071705b428902 abort (/lib/x86_64-linux-gnu/libc.so.6+0x28902)
 #7 0x000071705b42881e (/lib/x86_64-linux-gnu/libc.so.6+0x2881e)
 #8 0x000071705b43b7c7 (/lib/x86_64-linux-gnu/libc.so.6+0x3b7c7)
 #9 0x000060cf8707722e clang::IgnoreParensSingleStep(clang::Expr*) SemaInit.cpp:0:0
#10 0x000060cf87a022bb clang::Expr::IgnoreParenCasts() (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0xba1d2bb)
#11 0x000060cf8671debe 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
#12 0x000060cf86714b2b 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*>>>>*) UncountedLambdaCapturesChecker.cpp:0:0
#13 0x000060cf8672d41a clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionHelper(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#14 0x000060cf8670f242 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseFunctionDecl(clang::FunctionDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#15 0x000060cf8670cfe5 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#16 0x000060cf8670c9d7 clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#17 0x000060cf8672c44b clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) UncountedLambdaCapturesChecker.cpp:0:0
#18 0x000060cf8670d2fa clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) UncountedLambdaCapturesChecker.cpp:0:0
#19 0x000060cf8670cafc clang::RecursiveASTVisitor<(anonymous namespace)::UncountedLambdaCapturesChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) UncountedLambdaCapturesChecker.cpp:0:0
#20 0x000060cf8670c88f 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
#21 0x000060cf867c7922 clang::ento::CheckerManager::runCheckersOnASTDecl(clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0xa7e2922)
#22 0x000060cf86370963 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#23 0x000060cf868cd8a9 clang::ParseAST(clang::Sema&, bool, bool) (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0xa8e88a9)
#24 0x000060cf8502e2ef clang::FrontendAction::Execute() (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0x90492ef)
#25 0x000060cf84fa468d clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/b/sanitizer-x86_64-linux-bootstrap-ubsan/build/llvm_build2_ubsan/bin/clang+0x8fbf68d)

@rniwa rniwa deleted the trivial-lambdas-and-noescape branch November 1, 2024 04:47
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
…[[clang::noescape]]. (llvm#113845)

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial
functions as well as the one being passed to an argument with
[[clang::noescape]] attribute. This dramatically reduces the false
positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking
lambdas via VisitDeclRefExpr and VisitCallExpr. The idea is that if a
lambda is defined but never called or stored somewhere, then capturing
whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and
registers its DeclRefExpr to be ignored in VisitDeclRefExpr. If a lambda
is being passed to a function, it checks whether its argument is
annotated with [[clang::noescape]]. If it's not annotated such, it
checks captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as
function type parameters are variadic template function so we hard-code
this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and
adds a bunch of tests.
smallp-o-p pushed a commit to smallp-o-p/llvm-project that referenced this pull request Nov 3, 2024
…ons and [[clang::noescape]]." (llvm#114372)

Reverts llvm#113845. Introduced a test failure.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…[[clang::noescape]]. (llvm#113845)

This PR makes webkit.UncountedLambdaCapturesChecker ignore trivial
functions as well as the one being passed to an argument with
[[clang::noescape]] attribute. This dramatically reduces the false
positive rate for this checker.

To do this, this PR replaces VisitLambdaExpr in favor of checking
lambdas via VisitDeclRefExpr and VisitCallExpr. The idea is that if a
lambda is defined but never called or stored somewhere, then capturing
whatever variable in such a lambda is harmless.

VisitCallExpr explicitly looks for direct invocation of lambdas and
registers its DeclRefExpr to be ignored in VisitDeclRefExpr. If a lambda
is being passed to a function, it checks whether its argument is
annotated with [[clang::noescape]]. If it's not annotated such, it
checks captures for their safety.

Because WTF::switchOn could not be annotated with [[clang::noescape]] as
function type parameters are variadic template function so we hard-code
this function into the checker.

Finally, this PR also converts the accompanying test to use -verify and
adds a bunch of tests.
NoumanAmir657 pushed a commit to NoumanAmir657/llvm-project that referenced this pull request Nov 4, 2024
…ons and [[clang::noescape]]." (llvm#114372)

Reverts llvm#113845. Introduced a test failure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:static analyzer clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants