Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-3794

PATCH lupdate crash with qt-4.5.0

    XMLWordPrintable

Details

    • 3570e978058816745101a69b552ad9d07e349542

    Description

      I found a bug during mass rebuild for Fedora 11. There're steps to reproduce
      the crash in lupdate/lrelease.

      This problem doesn't show up in Qt-4.4.x. I made a patch that resolves the
      crash for me. It's great if you could review it and add it in next Qt update.

      For more infos please take a look at
      https://bugzilla.redhat.com/show_bug.cgi?id=486866

      patch:

      diff -up qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp.orig qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp
      — qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp.orig 2009-03-16 12:50:03.000000000 +0100
      +++ qt-x11-opensource-src-4.5.0/tools/linguist/shared/profileevaluator.cpp 2009-03-17 00:42:51.000000000 +0100
      @@ -86,6 +86,7 @@ public:
      void enterScope(bool multiLine);
      void leaveScope();
      void finalizeBlock();
      + void cleanup();

      // implementation of AbstractProItemVisitor
      bool visitBeginProBlock(ProBlock *block);
      @@ -164,6 +165,15 @@ ProFileEvaluator::Private::Private(ProFi
      m_contNextLine = false;
      }

      +void ProFileEvaluator::Private::cleanup()
      +

      { + m_commentItem = 0; + m_block = 0; + m_proitem.clear(); + m_blockstack.clear(); + m_pendingComment.clear(); +}

      +
      bool ProFileEvaluator::Private::read(ProFile *pro)
      {
      QFile file(pro->fileName());
      @@ -180,11 +190,14 @@ bool ProFileEvaluator::Private::read(Pro
      while (!ts.atEnd()) {
      QString line = ts.readLine();
      if (!parseLine(line))

      { + cleanup(); q->errorMessage(format(".pro parse failure.")); return false; }

      ++m_lineNo;
      }
      +
      + cleanup();
      return true;
      }

      Attachments

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

        Activity

          People

            buddenha Oswald Buddenhagen
            janichol Andy Nichols
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes