[llvm-bugs] [Bug 34869] New: Assertion failure in clang::BodyFarm::getBody()

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Oct 7 02:05:37 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34869

            Bug ID: 34869
           Summary: Assertion failure in clang::BodyFarm::getBody()
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: ekarpenkov at apple.com
          Reporter: alexfh at google.com
                CC: dcoughlin at apple.com, ganna at apple.com,
                    kremenek at apple.com, llvm-bugs at lists.llvm.org

Static analyzer has recently (between r314418 and r314622) started generating a
variety of assertion failures that have one thing in common: there's
clang::BodyFarm::getBody() on the stack. I'm working on an isolated repro, but
in case someone finds an obvious issue, here's an example of a failure stack
trace:

assert.h assertion failed at llvm/tools/clang/include/clang/AST/Expr.h:137 in
void clang::Expr::setType(clang::QualType): (t.isNull() ||
!t->isReferenceType()) && "Expressions can't have reference type"
    @          0x52cf23a  __assert_fail
    @          0x14d3009  clang::Expr::setType()
    @          0x1fc0125  clang::Expr::Expr()
    @          0x2f1de70  clang::DeclRefExpr::DeclRefExpr()
    @          0x2f1e5de  clang::DeclRefExpr::Create()
    @          0x2f1e382  clang::DeclRefExpr::Create()
    @          0x2ad45ac  (anonymous namespace)::ASTMaker::makeDeclRefExpr()
    @          0x2ad4a54  (anonymous namespace)::ASTMaker::makeLvalueToRvalue()
    @          0x2ad320e  create_call_once()
    @          0x2ad2b00  clang::BodyFarm::getBody()
    @          0x2ab426f  clang::AnalysisDeclContext::getBody()
    @          0x2ab44b9  clang::AnalysisDeclContext::isBodyAutosynthesized()
    @           0xf369ab  (anonymous namespace)::AnalysisConsumer::HandleCode()
    @           0xf7e62d  (anonymous
namespace)::AnalysisConsumer::VisitFunctionDecl()
    @           0xf7df55 
clang::RecursiveASTVisitor<>::WalkUpFromFunctionDecl()
    @           0xf2f632  clang::RecursiveASTVisitor<>::TraverseFunctionDecl()
    @           0xf29983  clang::RecursiveASTVisitor<>::TraverseDecl()
    @           0xf283c1  (anonymous
namespace)::AnalysisConsumer::HandleTranslationUnit()
    @          0x136023e  clang::MultiplexConsumer::HandleTranslationUnit()
    @          0x1dbb5d6  clang::ParseAST()
    @          0x134daea  clang::ASTFrontendAction::ExecuteAction()
    @          0x134d580  clang::FrontendAction::Execute()
    @          0x1162b82  clang::CompilerInstance::ExecuteAction()
    @          0x102bcf2 
clang::tooling::FrontendActionFactory::runInvocation()
    @          0x102bb93  clang::tooling::ToolInvocation::runInvocation()
    @          0x102a456  clang::tooling::ToolInvocation::run()
    @          0x102cd80  clang::tooling::ClangTool::run()
    @           0x897ff4  clang::tidy::runClangTidy()
    @           0x5df8b1  clang::tidy::clangTidyMain()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171007/ed31d2f7/attachment.html>


More information about the llvm-bugs mailing list