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

AddressSanitizer: attempting free on address which was not malloc()-ed - in WebEngine

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.9.1
    • WebEngine
    • None
    • Ubuntu 16.04 64bit

      Behind a http Proxy (Have not tested without proxy)

    Description

      It looks like if there is a misplaced free in webengine.

      Reproduction steps:
      0.1. Start demobrowser w/o Address Sanitizer
      0.2. Enter Proxy Data (Alternatively make sure, system proxy is properly set up)
      0.3. Quit again
      1. Build with Address Sanitizer and start

      demobrowser$ cat >>demobrowser.pro <<EOF
      >
      > QMAKE_CC = clang
      > QMAKE_CXX = clang++
      >
      > QMAKE_LINK = $$QMAKE_CXX
      > QMAKE_LINK_SHLIB = $$QMAKE_CXX
      >
      > QMAKE_CXXFLAGS += -Qunused-arguments -Wno-tautological-undefined-compare -Wno-undefined-bool-conversion -Wno-deprecated-register -Wno-mismatched-tags
      > QMAKE_CFLAGS += -Qunused-arguments
      >
      > QMAKE_LFLAGS += -fsanitize=address
      > QMAKE_CXXFLAGS += -O1 -fsanitize=address -fno-omit-frame-pointer
      >
      > EOF
      demobrowser$ $QTDIR/bin/qmake && make && ./demobrowser 'https://www.qt.io/'
      [...]

      2. Enter proxy username & Password
      3. Watch it crash

      [...]
      QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-m2puser'
      qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method
      qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method
      =================================================================
      ==19580==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x000001fc6010 in thread T0 (demobrowser)
      #0 0x4ed060 (/home/bernd/devel/demobrowser/demobrowser+0x4ed060)
      #1 0x7f2cfc2877cc (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x11657cc)
      #2 0x7f2cfc287818 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x1165818)
      #3 0x7f2cfc1fec3b (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x10dcc3b)
      #4 0x7f2cfc1feed8 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x10dced8)
      #5 0x7f2cfbec7c53 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0xda5c53)
      #6 0x7f2cfc9fc2f5 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18da2f5)
      #7 0x7f2cfca00b4a (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18deb4a)
      #8 0x7f2cfca01e73 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18dfe73)
      #9 0x7f2cfc9f9dce (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18d7dce)
      #10 0x7f2cfc9f9eed (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18d7eed)
      #11 0x7f2cfca06dc4 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x18e4dc4)
      #12 0x7f2cfc1e41c8 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x10c21c8)
      #13 0x7f2cfc18899f (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x106699f)
      #14 0x7f2cfc18a5dc (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x10685dc)
      #15 0x7f2cfc18aa94 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x1068a94)
      #16 0x7f2cfb8480b4 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5WebEngineCore.so.5+0x7260b4)
      #17 0x7f2cf860c37a (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x2a437a)
      #18 0x7f2cfa1a34bb (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Widgets.so.5+0x1534bb)
      #19 0x7f2cfa1aa8e6 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Widgets.so.5+0x15a8e6)
      #20 0x7f2cf85e0eb7 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x278eb7)
      #21 0x7f2cf85e354a (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x27b54a)
      #22 0x7f2cf8633ad2 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x2cbad2)
      #23 0x7f2cf6256196 (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a196)
      #24 0x7f2cf62563ef (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a3ef)
      #25 0x7f2cf625649b (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x4a49b)
      #26 0x7f2cf863311e (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x2cb11e)
      #27 0x7f2cf85df4a9 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x2774a9)
      #28 0x7f2cf85e7d33 (/opt/Qt5.9.1/5.9.1/gcc_64/lib/libQt5Core.so.5+0x27fd33)
      #29 0x603897 (/home/bernd/devel/demobrowser/demobrowser+0x603897)
      #30 0x7f2cf6da882f (/lib/x86_64-linux-gnu/libc.so.6+0x2082f)
      #31 0x44d0b8 (/home/bernd/devel/demobrowser/demobrowser+0x44d0b8)

      AddressSanitizer can not describe address in more detail (wild memory access suspected).
      SUMMARY: AddressSanitizer: bad-free (/home/bernd/devel/demobrowser/demobrowser+0x4ed060)
      ==19580==ABORTING
      demobrowser$

      Attachments

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

        Activity

          People

            qt_webengine_team Qt WebEngine Team
            noll Bernd Noll
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes