Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-12673

Crash due to infinite recursion when parsing c file

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • Qt Creator 3.2.0-rc1
    • Qt Creator 3.2.0-beta1
    • C/C++/Obj-C++ Support
    • None
    • Fedora rawhide
      qt-creator-3.2.0-0.1.beta1.fc22.x86_64

    Description

      Steps to reproduce:

      1. Create some folder (i.e. test), download attached limits-caselabels.c into it
      1. qt-creator: File -> New File or Project -> Import Existing Project ->
      3. Select test folder
      4. Finish project setup
      5. Wait for qt creator to finish parsing files
      6. qt-creator will crash

      Stacktrace:
      #0 0x00007fffd9699e94 in CPlusPlus::AST::AST() (this=0x7fff6d861070)
      at ../3rdparty/cplusplus/AST.cpp:42
      #1 0x00007fffd96c3ce3 in CPlusPlus::Parser::parseNumericLiteral(CPlusPlus::ExpressionAST*&) (this=0x7fff6d861070) at ../3rdparty/cplusplus/AST.h:307
      #2 0x00007fffd96c3ce3 in CPlusPlus::Parser::parseNumericLiteral(CPlusPlus::ExpressionAST*&) (this=0x7fff6d861070) at ../3rdparty/cplusplus/AST.h:3117
      #3 0x00007fffd96c3ce3 in CPlusPlus::Parser::parseNumericLiteral(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:4233
      #4 0x00007fffd96cb065 in CPlusPlus::Parser::parsePrimaryExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:4291
      #5 0x00007fffd96cb4cf in CPlusPlus::Parser::parseCorePostfixExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:4909
      #6 0x00007fffd96cb89d in CPlusPlus::Parser::parsePostfixExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:4917
      #7 0x00007fffd96cbec7 in CPlusPlus::Parser::parseUnaryExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:5053
      #8 0x00007fffd96ce495 in CPlusPlus::Parser::parseCastExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:5280
      #9 0x00007fffd96cee6b in CPlusPlus::Parser::parseConditionalExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:5340
      #10 0x00007fffd96ceec5 in CPlusPlus::Parser::parseConstantExpression(CPlusPlus::ExpressionAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861058: 0x0) at ../3rdparty/cplusplus/Parser.cpp:5371
      #11 0x00007fffd96d9c27 in CPlusPlus::Parser::parseLabeledStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861030: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3619
      #12 0x00007fffd96ca803 in CPlusPlus::Parser::parseStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d861030: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3130
      #13 0x00007fffd96d9c46 in CPlusPlus::Parser::parseLabeledStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d860ff8: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3621
      #14 0x00007fffd96ca803 in CPlusPlus::Parser::parseStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d860ff8: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3130
      #15 0x00007fffd96d9c46 in CPlusPlus::Parser::parseLabeledStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d860fc0: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3621
      #16 0x00007fffd96ca803 in CPlusPlus::Parser::parseStatement(CPlusPlus::StatementAST*&) (this=this@entry=0x7fffc11738a0, node=@0x7fff6d860fc0: 0x0) at ../3rdparty/cplusplus/Parser.cpp:3130
      [... infinite recusion of Parser.cpp:3130 -> Parser.cpp:3621 -> Parser.cpp:3130...]

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            erikv Erik Verbruggen
            smani Sandro Mani
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes