[PATCH] D23418: [analyzer] Added a reusable constraint system to the CloneDetector
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 5 08:22:51 PDT 2017
NoQ reopened this revision.
NoQ added a comment.
This revision is now accepted and ready to land.
Hmm, reverted because i'm seeing crashes on some buildbots (works for me though).
It's crashing somewhere in `saveHash`, seems that some `Stmt`s are null. For instance, http://lab.llvm.org:8011/builders/clang-cmake-aarch64-42vma/builds/5998 :
#0 0x00000000015356f8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x15356f8)
#1 0x0000000001533a58 llvm::sys::RunSignalHandlers() (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x1533a58)
#2 0x0000000001533d0c SignalHandler(int) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x1533d0c)
#3 0x000003ffb5150510 (linux-vdso.so.1+0x510)
#4 0x0000000002b562f0 clang::Stmt::children() (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x2b562f0)
#5 0x00000000029772a4 clang::RecursiveCloneTypeIIConstraint::saveHash(clang::Stmt const*, clang::Decl const*, std::vector<std::pair<unsigned long, clang::StmtSequence>, std::allocator<std::pair<unsigned long, clang::StmtSequence> > >&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x29772a4)
#6 0x00000000029795a8 clang::RecursiveCloneTypeIIConstraint::constrain(std::vector<llvm::SmallVector<clang::StmtSequence, 8u>, std::allocator<llvm::SmallVector<clang::StmtSequence, 8u> > >&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x29795a8)
#7 0x00000000026786b0 void clang::CloneDetector::findClones<clang::RecursiveCloneTypeIIConstraint, clang::MinComplexityConstraint, clang::MinGroupSizeConstraint, clang::OnlyLargestCloneConstraint>(std::vector<llvm::SmallVector<clang::StmtSequence, 8u>, std::allocator<llvm::SmallVector<clang::StmtSequence, 8u> > >&, clang::RecursiveCloneTypeIIConstraint, clang::MinComplexityConstraint, clang::MinGroupSizeConstraint, clang::OnlyLargestCloneConstraint) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x26786b0)
#8 0x0000000002678b08 void clang::ento::check::EndOfTranslationUnit::_checkEndOfTranslationUnit<(anonymous namespace)::CloneChecker>(void*, clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x2678b08)
#9 0x00000000028a9394 clang::ento::CheckerManager::runCheckersOnEndOfTranslationUnit(clang::TranslationUnitDecl const*, clang::ento::AnalysisManager&, clang::ento::BugReporter&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x28a9394)
#10 0x000000000204b62c (anonymous namespace)::AnalysisConsumer::HandleTranslationUnit(clang::ASTContext&) [clone .part.4452] [clone .constprop.4496] (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x204b62c)
#11 0x000000000206de78 clang::ParseAST(clang::Sema&, bool, bool) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x206de78)
#12 0x00000000019e96b4 clang::FrontendAction::Execute() (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x19e96b4)
#13 0x00000000019c2c70 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x19c2c70)
#14 0x0000000001a64f30 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x1a64f30)
#15 0x0000000000998420 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x998420)
#16 0x0000000000963b94 main (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x963b94)
#17 0x000003ffb4bef68c __libc_start_main (/lib64/libc.so.6+0x1f68c)
#18 0x00000000009950e8 _start (/home/buildslave/buildslave/clang-cmake-aarch64-42vma/stage1/./bin/clang+0x9950e8)
Repository:
rL LLVM
https://reviews.llvm.org/D23418
More information about the cfe-commits
mailing list