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

Windows: Null pointer dereference in QTextStream.cpp caused by QTextCodec::codecForLocale() returning 0 when running an ICU-build under Cygwin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Not Evaluated
    • Resolution: Done
    • Affects Version/s: 5.2.1
    • Fix Version/s: None
    • Component/s: Core: I/O
    • Labels:
      None

      Description

      I get a crash in dumpcpp.exe while building Qt. I might have launched configure with wrong parameters, but that's not the point of the thread.
      The crash is in QTextStreamPrivate::flushWriteBuffer(). While doing
      codec->fromUnicode(writeBuffer.data(), writeBuffer.size(), &writeConverterState);
      codec is actually NULL.
      From What i see in my makefiles, Qtextstream.cpp was not build with QT_NO_TEXTCODEC, so code went through
      if (!codec)
      codec = QTextCodec::codecForLocale();
      And from reading QTextCodec::codecForLocale, it is expected that it will return 0 in at least one case. So i think the pointer should be checked again after codecForLocale there, and a less fatal/more verbose error should be raised

        Attachments

        1. qtbug38496.log
          1 kB
        2. qtbug38496.zip
          1 kB

          Issue Links

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

            Activity

              People

              Assignee:
              laknoll Lars Knoll
              Reporter:
              bartoli Olivier BARTHELEMY
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes