Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Valgrind hits in QString?
Forum Updated to NodeBB v4.3 + New Features

Valgrind hits in QString?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 3.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    bms20
    wrote on last edited by
    #1

    All,
    I may be asking a dumb question here - possibly I've not initialized something correctly:

    I see valgrind hits in QString::fromLatin1_helper(), where it looks like the declaration on line 102 of qstring.cpp is not correctly initialized.

    Line 102 states:
    QTextCodec *QString::codecForCStrings;

    Should this not be set to zero by default?

    -bms

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Do you also get this hit if you run valgrind through Qt Creator's analyzer? That is valgrind as well, but it uses ignore lists for Qt where valgrind is known to give false positives...

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bms20
        wrote on last edited by
        #3

        I can't see how that would help in this case; although I'll try your suggestion this evening.

        However, I fail to see where the QTextCodec is initialized; it must be operating by luck - i.e. initialized as zero by the loader.

        The more I look at it, line 102 looks to me like an initializer that someone forgot to finish. I.e. it adds nothing, since codecForCStrings is declared in the QString header. qstring.h is included from qstringlist.h, and therefore, this line does nothing.

        -bms

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          If you feel you have found a bug in Qt, I would suggest you "report":http://bugreports.qt.nokia.com it, or better yet, prepare a patch and "submit":http://qt-project.org/ it. I'm sure fixes would be welcomed!

          I would also suggest you pop into IRC into the #qt-labs channel on freenode. This is the public hideout of Qt developers, and you'll find people there much more knowledgeable on the inner workings of Qt than I am.

          1 Reply Last reply
          0
          • B Offline
            B Offline
            bms20
            wrote on last edited by
            #5

            Great - that is a huge help. (Where to report bugs was my next question). I'll take it there.
            Cheers,

            -bms

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved