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

Datatype misalignment on ARM processor when the message WM_SETTINGCHANGE is processed

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 4.6.3
    • 4.6.0
    • None
    • bab18de3932a802568d6d9e0cea9e76f02e6bf5d

    Description

      A datatype misalignment occurs in the function QString::fromUtf16 called by QString::fromWCharArray when WM_SETTINGCHANGED is processed

      How to reproduce:

      • launch a QT application
      • In Windows Mobile, select Start->Settings->Regional and change the country, or the time or date format.

      Detailed stack trace:

      In QString.cpp
      QString QString::fromUtf16(const ushort *unicode, int size)
      {
          if (!unicode)
              return QString();
          if (size < 0) {
              size = 0;
              while (unicode[size] != 0) >>>>DATATYPE MISALIGNMENT EXCEPTION
                  ++size;
          }
          return QUtf16::convertToUnicode((const char *)unicode, size*2, 0);
      }
      
      In QString.cpp
      QString QString::fromWCharArray(const wchar_t *string, int size)
      {
          if (sizeof(wchar_t) == sizeof(QChar)) {
              return fromUtf16((ushort *)string, size);  >>>>>>>> CALLS TO fromUtf16 WHICH THROWS
          } else {
              return fromUcs4((uint *)string, size);
          }
      }
      
      In QApplication_win.cpp
              case WM_SETTINGCHANGE:
                  if ( QApplication::type() == QApplication::Tty )
                      break;
      
                  if (!msg.wParam) {
                      QString area = QString::fromWCharArray((wchar_t*)msg.lParam); >>>>>> CALLS fromUtf16 WHICH THROWS
                      if (area == QLatin1String("intl")) {
                          QLocalePrivate::updateSystemPrivate();
                          if (!widget->testAttribute(Qt::WA_SetLocale))
                              widget->dptr()->setLocale_helper(QLocale(), true);
                      }
                  }
      

      Attachments

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

        Activity

          People

            jbornema Joerg Bornemann
            pbrandoli Paolo Brandoli
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes