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

Undefined Behavior in qtspeech

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2: Important P2: Important
    • None
    • 5.15.2
    • Speech
    • None
    • Linux/X11
    • 9e34b54f38102177cfd2400e275d5dcaa39afb50

      I have been experiencing crashes in KDE applications upon quitting, since building qtspeech with Clang 13.0.0. This version of Clang has been known to introduce UB [1]. See below for the ubsan report:

       

      telans@desktop ~ $ LD_PRELOAD=/usr/lib/clang/13.0.0/lib/linux/libclang_rt.ubsan_standalone-x86_64.so kmail
      Cannot initialize model with data QJsonObject() . missing: QJsonValue(string, "urls")
      FolderCollectionMonitor::~FolderCollectionMonitor() MailCommon::FolderCollectionMonitor(0x55c6c95d9cd0)
      /var/tmp/portage/dev-qt/qtspeech-5.15.2-r1/work/qtspeech-everywhere-src-5.15.2/src/tts/qtexttospeech.cpp:87:15: runtime error: member call on address 0x55c6c9c535f0 which does not point to an object of type 'QTextToSpeech'
      0x55c6c9c535f0: note: object is of type 'QObject'
      00 00 00 00 48 c6 79 2b d2 7f 00 00 d0 27 c5 c9 c6 55 00 00 6e 66 69 67 00 00 00 00 41 00 00 00
      ^~~~~~~~~~~~~~~~~~~~~~~
      vptr for 'QObject'
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /var/tmp/portage/dev-qt/qtspeech-5.15.2-r1/work/qtspeech-everywhere-src-5.15.2/src/tts/qtexttospeech.cpp:87:15 in
      /var/tmp/portage/dev-qt/qtspeech-5.15.2-r1/work/qtspeech-everywhere-src-5.15.2/src/tts/qtexttospeech.cpp:263:5: runtime error: member call on address 0x55c6c9c535f0 which does not point to an object of type 'QTextToSpeech'
      0x55c6c9c535f0: note: object is of type 'QObject'
      00 00 00 00 48 c6 79 2b d2 7f 00 00 d0 27 c5 c9 c6 55 00 00 6e 66 69 67 00 00 00 00 41 00 00 00
      ^~~~~~~~~~~~~~~~~~~~~~~
      vptr for 'QObject'
      SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /var/tmp/portage/dev-qt/qtspeech-5.15.2-r1/work/qtspeech-everywhere-src-5.15.2/src/tts/qtexttospeech.cpp:263:5 in

       

      I understand that Qt 5.15.2 no longer receives bug updates, however, there have not been any commits addressing the source files even in the Qt 6 dev branch, and so I believe it still applies. Cheers

       

      :[1]

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

            axelspoerl Axel Spoerl
            telans Theo Anderson
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes