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

Memory issue in libcomposeplatforminputcontextplugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • None
    • 5.1.0 Beta 1
    • None
    • Linux 64 bit, gcc 4.8.0, qtbase compiled with QMAKE_CXXFLAGS+="-fno-omit-frame-pointer -fsanitize=address" LIBS+="-lasan"
    • Change-Id: I17c60bbade1486399f745c7e9878c6467971e6cc

    Description

      I compiled latest qtbase/stable with gcc 4.8 and AddressSanitizer. The tool indicates a memory corruption in the libcomposeplatforminputcontextplugin.so:

      =================================================================
      ==31539== ERROR: AddressSanitizer: heap-use-after-free on address 0x60080002ace8 at pc 0x7f45b1f31d95 bp 0x7fffadd4cb00 sp 0x7fffadd4cac8
      READ of size 1 at 0x60080002ace8 thread T0
          #0 0x7f45b1f31d94 (/usr/local/gcc-4.8.0/lib64/libasan.so.0.0.0+0x10d94)
          #1 0x7f45b0f0da07 (/lib64/libc-2.17.so+0x36a07)
          #2 0x7f45a83a68ae (/usr/lib64/libxkbcommon.so.0.0.0+0x378ae)
          #3 0x7f45a85dca65 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xaa65)
          #4 0x7f45a85dd5e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xb5e9)
          #5 0x7f45a85dc3c4 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa3c4)
          #6 0x7f45a85dc0e0 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa0e0)
          #7 0x7f45a85db659 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x9659)
          #8 0x7f45a85daed3 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x8ed3)
          #9 0x7f45a85d85e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x65e9)
          #10 0x7f45a85d7999 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x5999)
          #11 0x7f45b5b007c8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a27c8)
          #12 0x7f45b5affa48 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a1a48)
          #13 0x7f45b5affdd2 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a1dd2)
          #14 0x7f45aba582ce (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforms/libqxcb.so+0x5f2ce)
          #15 0x7f45aba89bd8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforms/libqxcb.so+0x90bd8)
          #16 0x7f45b5b05e19 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a7e19)
          #17 0x7f45b5b05265 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a7265)
          #18 0x7f45b5b12d6a (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b4d6a)
          #19 0x7f45b5b144c7 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b64c7)
          #20 0x7f45b5b14558 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b6558)
          #21 0x7f45b7559a4f (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Widgets.so.5.1.0+0x2b6a4f)
          #22 0x7f45b52f11cf (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x4411cf)
          #23 0x7f45b52f0e67 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x440e67)
          #24 0x7f45b5b11320 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b3320)
          #25 0x7f45b748ede8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Widgets.so.5.1.0+0x1ebde8)
          #26 0x407c27 (/home/kkoehne/dev/creator-2.7-qt-5.1-gcc-4.8.0-64/bin/qtcreator+0x407c27)
          #27 0x40ef00 (/home/kkoehne/dev/creator-2.7-qt-5.1-gcc-4.8.0-64/bin/qtcreator+0x40ef00)
          #28 0x7f45b0ef8a14 (/lib64/libc-2.17.so+0x21a14)
          #29 0x407798 (/home/kkoehne/dev/creator-2.7-qt-5.1-gcc-4.8.0-64/bin/qtcreator+0x407798)
      0x60080002ace8 is located 24 bytes inside of 35-byte region [0x60080002acd0,0x60080002acf3)
      freed by thread T0 here:
          #0 0x7f45b1f36c5a (/usr/local/gcc-4.8.0/lib64/libasan.so.0.0.0+0x15c5a)
          #1 0x7f45b4fcfda9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x11fda9)
          #2 0x7f45a85dfc95 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xdc95)
          #3 0x7f45a85dea26 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xca26)
          #4 0x7f45a85dca54 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xaa54)
          #5 0x7f45a85dd5e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xb5e9)
          #6 0x7f45a85dc3c4 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa3c4)
          #7 0x7f45a85dc0e0 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa0e0)
          #8 0x7f45a85db659 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x9659)
          #9 0x7f45a85daed3 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x8ed3)
          #10 0x7f45a85d85e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x65e9)
          #11 0x7f45a85d7999 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x5999)
          #12 0x7f45b5b007c8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a27c8)
          #13 0x7f45b5affa48 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a1a48)
          #14 0x7f45b5affdd2 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a1dd2)
          #15 0x7f45aba582ce (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforms/libqxcb.so+0x5f2ce)
          #16 0x7f45aba89bd8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforms/libqxcb.so+0x90bd8)
          #17 0x7f45b5b05e19 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a7e19)
          #18 0x7f45b5b05265 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1a7265)
          #19 0x7f45b5b12d6a (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b4d6a)
          #20 0x7f45b5b144c7 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b64c7)
          #21 0x7f45b5b14558 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b6558)
          #22 0x7f45b7559a4f (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Widgets.so.5.1.0+0x2b6a4f)
          #23 0x7f45b52f11cf (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x4411cf)
          #24 0x7f45b52f0e67 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x440e67)
          #25 0x7f45b5b11320 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Gui.so.5.1.0+0x1b3320)
          #26 0x7f45b748ede8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Widgets.so.5.1.0+0x1ebde8)
          #27 0x407c27 (/home/kkoehne/dev/creator-2.7-qt-5.1-gcc-4.8.0-64/bin/qtcreator+0x407c27)
          #28 0x40ef00 (/home/kkoehne/dev/creator-2.7-qt-5.1-gcc-4.8.0-64/bin/qtcreator+0x40ef00)
          #29 0x7f45b0ef8a14 (/lib64/libc-2.17.so+0x21a14)
      previously allocated by thread T0 here:
          #0 0x7f45b1f36d3a (/usr/local/gcc-4.8.0/lib64/libasan.so.0.0.0+0x15d3a)
          #1 0x7f45b4fcfb41 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x11fb41)
          #2 0x7f45b4fe1a5e (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x131a5e)
          #3 0x7f45b4fd49b8 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x1249b8)
          #4 0x7f45b51099bc (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x2599bc)
          #5 0x7f45b5109c34 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/lib/libQt5Core.so.5.1.0+0x259c34)
          #6 0x7f45a85dca38 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xaa38)
          #7 0x7f45a85dd5e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xb5e9)
          #8 0x7f45a85dc3c4 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa3c4)
          #9 0x7f45a85dc0e0 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0xa0e0)
          #10 0x7f45a85db659 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x9659)
          #11 0x7f45a85daed3 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x8ed3)
          #12 0x7f45a85d85e9 (/home/kkoehne/dev/qt/qt-5.1-gcc-4.8.0-64/qtbase/plugins/platforminputcontexts/libcomposeplatforminputcontextplugin.so+0x65e9)
      

      Deleting the plugin makes the issue go away.

      Attachments

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

        Activity

          People

            paeglis Gatis Paeglis
            kkohne Kai Köhne
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes