[clang] [alpha.webkit.RetainPtrCtorAdoptChecker] An assortment of small enhancements (PR #135329)

LLVM Continuous Integration via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 27 14:45:19 PDT 2025


llvm-ci wrote:

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/23727

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

```
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'Clang :: Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm' FAILED ********************
Exit Code: 134

Command Output (stderr):
--
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=alpha.webkit.RetainPtrCtorAdoptChecker -fobjc-arc -verify /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm # RUN: at line 2
+ /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=alpha.webkit.RetainPtrCtorAdoptChecker -fobjc-arc -verify /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm
clang: /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, preprocessed source, and associated run script.
Stack dump:
0.	Program arguments: /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=alpha.webkit.RetainPtrCtorAdoptChecker -fobjc-arc -verify /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm
1.	<eof> parser at end of file
 #0 0x00005d3415b394c0 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x21fa4c0)
 #1 0x00005d3415b368cf llvm::sys::RunSignalHandlers() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x21f78cf)
 #2 0x00005d3415b36a1a SignalHandler(int, siginfo_t*, void*) Signals.cpp:0:0
 #3 0x000074d1ac377520 (/lib/x86_64-linux-gnu/libc.so.6+0x42520)
 #4 0x000074d1ac3cb9fc __pthread_kill_implementation ./nptl/pthread_kill.c:44:76
 #5 0x000074d1ac3cb9fc __pthread_kill_internal ./nptl/pthread_kill.c:78:10
 #6 0x000074d1ac3cb9fc pthread_kill ./nptl/pthread_kill.c:89:10
 #7 0x000074d1ac377476 gsignal ./signal/../sysdeps/posix/raise.c:27:6
 #8 0x000074d1ac35d7f3 abort ./stdlib/abort.c:81:7
 #9 0x000074d1ac35d71b _nl_load_domain ./intl/loadmsgcat.c:1177:9
#10 0x000074d1ac36ee96 (/lib/x86_64-linux-gnu/libc.so.6+0x39e96)
#11 0x00005d3418689bb4 (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x4d4abb4)
#12 0x00005d34191d4f78 clang::Expr::IgnoreParenCasts() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x5895f78)
#13 0x00005d3417d53639 (anonymous namespace)::RetainPtrCtorAdoptChecker::isAllocInit(clang::Expr const*, clang::Expr const**) const (.constprop.0) RetainPtrCtorAdoptChecker.cpp:0:0
#14 0x00005d3417d692ea clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseObjCMessageExpr(clang::ObjCMessageExpr*, llvm::SmallVectorImpl<llvm::PointerIntPair<clang::Stmt*, 1u, bool, llvm::PointerLikeTypeTraits<clang::Stmt*>, llvm::PointerIntPairInfo<clang::Stmt*, 1u, llvm::PointerLikeTypeTraits<clang::Stmt*>>>>*) RetainPtrCtorAdoptChecker.cpp:0:0
#15 0x00005d3417d64029 clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::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) RetainPtrCtorAdoptChecker.cpp:0:0
#16 0x00005d3417d6c070 clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseObjCMethodDecl(clang::ObjCMethodDecl*) RetainPtrCtorAdoptChecker.cpp:0:0
#17 0x00005d3417d5c2ae clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) (.part.0) RetainPtrCtorAdoptChecker.cpp:0:0
#18 0x00005d3417d5aa1e clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDecl(clang::Decl*) RetainPtrCtorAdoptChecker.cpp:0:0
#19 0x00005d3417d5c2ae clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseDeclContextHelper(clang::DeclContext*) (.part.0) RetainPtrCtorAdoptChecker.cpp:0:0
#20 0x00005d3417d6bf4b clang::RecursiveASTVisitor<(anonymous namespace)::RetainPtrCtorAdoptChecker::checkASTDecl(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) const::LocalVisitor>::TraverseTranslationUnitDecl(clang::TranslationUnitDecl*) RetainPtrCtorAdoptChecker.cpp:0:0
#21 0x00005d3417d5cc35 void clang::ento::check::ASTDecl<clang::TranslationUnitDecl>::_checkDecl<(anonymous namespace)::RetainPtrCtorAdoptChecker>(void*, clang::Decl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) RetainPtrCtorAdoptChecker.cpp:0:0
#22 0x00005d3417deb399 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+0x44ac399)
#23 0x00005d34179bace9 (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) AnalysisConsumer.cpp:0:0
#24 0x00005d3417f8547c clang::ParseAST(clang::Sema&, bool, bool) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x464647c)
#25 0x00005d34167bee19 clang::FrontendAction::Execute() (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x2e7fe19)
#26 0x00005d341673a805 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x2dfb805)
#27 0x00005d34168a6688 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0x2f67688)
#28 0x00005d3414601967 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0xcc2967)
#29 0x00005d34145f787a ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) driver.cpp:0:0
#30 0x00005d34145fc4fe clang_main(int, char**, llvm::ToolContext const&) (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0xcbd4fe)
#31 0x00005d34144e5c5b main (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0xba6c5b)
#32 0x000074d1ac35ed90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
#33 0x000074d1ac35ee40 call_init ./csu/../csu/libc-start.c:128:20
#34 0x000074d1ac35ee40 __libc_start_main ./csu/../csu/libc-start.c:379:5
#35 0x00005d34145f6fa5 _start (/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang+0xcb7fa5)
/home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/tools/clang/test/Analysis/Checkers/WebKit/Output/retain-ptr-ctor-adopt-use-arc.mm.script: line 1: 1246584 Aborted                 (core dumped) /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/bin/clang -cc1 -internal-isystem /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/build/lib/clang/21/include -nostdsysteminc -analyze -analyzer-constraints=range -setup-static-analyzer -analyzer-checker=alpha.webkit.RetainPtrCtorAdoptChecker -fobjc-arc -verify /home/buildbot/buildbot-root/llvm-clang-x86_64-sie-ubuntu-fast/llvm-project/clang/test/Analysis/Checkers/WebKit/retain-ptr-ctor-adopt-use-arc.mm

...

```

</details>

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


More information about the cfe-commits mailing list