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

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.2.1
    • Core: I/O
    • None

      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

        1. qtbug38496.zip
          1 kB
        2. qtbug38496.log
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes