qt5base-lts/tests/auto/widgets/kernel
Marc Mutz 239b71d07d Fix use-after-delete bug in tst_QWidget::taskQTBUG_27643_enterEvents()
ASAN report:

  READ of size 8 at 0x606000011990 thread T0
    #0 0x505e3b in EnterTestMainDialog::eventFilter(QObject*, QEvent*) tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10294
    [...]

  0x606000011990 is located 48 bytes inside of 56-byte region [0x606000011960,0x606000011998)
  freed by thread T0 here:
    #0 0x2b8df3551c79 in operator delete(void*) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:92
    #1 0x418ab5 in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10276

  previously allocated by thread T0 here:
    #0 0x2b8df3551739 in operator new(unsigned long) ../../../../gcc/libsanitizer/asan/asan_new_delete.cc:60
    #1 0x4188cf in EnterTestMainDialog::buttonPressed() tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp:10272

EnterTestMainDialog::eventFilter() checks for nullness of 'modal'
before accessing it, but buttonPressed() did not reset 'modal'
to nullptr after deletion.

Change-Id: I65562a29f8264a6996d7d615e06de1d1afb5af53
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-10-18 00:33:03 +02:00
..
qaction Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qactiongroup Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qapplication Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qboxlayout Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qdesktopwidget Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qformlayout Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qgridlayout Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qlayout Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qshortcut Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qsizepolicy Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qstackedlayout Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qtooltip Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qwidget Fix use-after-delete bug in tst_QWidget::taskQTBUG_27643_enterEvents() 2014-10-18 00:33:03 +02:00
qwidget_window Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qwidgetaction Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qwidgetmetatype Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qwidgetsvariant Update license headers and add new license files 2014-09-24 12:26:19 +02:00
qwindowcontainer Update license headers and add new license files 2014-09-24 12:26:19 +02:00
kernel.pro Introducing QWidget::createWindowContainer() 2013-01-25 14:11:07 +01:00