Details
-
Bug
-
Resolution: Fixed
-
P4: Low
-
None
-
6.3.0 Feature Freeze
-
None
-
acc3ef665 (dev), b52a0f8e1 (6.8)
Description
Says ubsan:
1: /home/marc/Qt/qtbase-build/include/QtGui/6.3.0/QtGui/private/../../../../../../qtbase/src/gui/kernel/qevent_p.h:73:62: runtime error: downcast of address 0x7fffca0e7fc0 which does not point to an object of type 'QMutableTouchEvent' 1: 0x7fffca0e7fc0: note: object is of type 'QTouchEvent' 1: 00 00 00 00 a0 0a 01 b8 61 7f 00 00 c2 00 00 00 01 00 00 60 f0 c5 00 00 20 60 00 00 00 00 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QTouchEvent' 1: /home/marc/Qt/qtbase/src/widgets/kernel/qapplication.cpp:3127:38: runtime error: member call on address 0x7fffca0e7fc0 which does not point to an object of type 'QMutableTouchEvent' 1: 0x7fffca0e7fc0: note: object is of type 'QTouchEvent' 1: 00 00 00 00 a0 0a 01 b8 61 7f 00 00 c2 00 00 00 01 00 00 60 f0 c5 00 00 20 60 00 00 00 00 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QTouchEvent' 1: /home/marc/Qt/qtbase-build/include/QtGui/6.3.0/QtGui/private/../../../../../../qtbase/src/gui/kernel/qevent_p.h:73:62: runtime error: downcast of address 0x7fffca0e8030 which does not point to an object of type 'QMutableTouchEvent' 1: 0x7fffca0e8030: note: object is of type 'QTouchEvent' 1: ff 7f 00 00 a0 0a 01 b8 61 7f 00 00 c2 00 00 00 01 00 00 60 f0 c5 00 00 20 60 00 00 00 00 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QTouchEvent' 1: /home/marc/Qt/qtbase/src/widgets/graphicsview/qgraphicsview.cpp:2924:60: runtime error: member call on address 0x7fffca0e8030 which does not point to an object of type 'QMutableTouchEvent' 1: 0x7fffca0e8030: note: object is of type 'QTouchEvent' 1: ff 7f 00 00 a0 0a 01 b8 61 7f 00 00 c2 00 00 00 01 00 00 60 f0 c5 00 00 20 60 00 00 00 00 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QTouchEvent' 1: /home/marc/Qt/qtbase/src/widgets/kernel/qapplication.cpp:3153:38: runtime error: member call on address 0x7fffca0e8030 which does not point to an object of type 'QMutableTouchEvent' 1: 0x7fffca0e8030: note: object is of type 'QTouchEvent' 1: ff 7f 00 00 a0 0a 01 b8 61 7f 00 00 c2 00 00 00 00 00 00 60 f0 c5 00 00 20 60 00 00 00 00 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QTouchEvent'
as well as
1: /home/marc/Qt/qtbase/src/widgets/kernel/qapplication.cpp:2816:66: runtime error: member call on address 0x7fffca0e05a0 which does not point to an object of type 'QMutableSinglePointEvent' 1: 0x7fffca0e05a0: note: object is of type 'QMouseEvent' 1: 00 00 00 00 20 04 01 b8 61 7f 00 00 05 00 00 01 01 00 00 e0 30 c6 00 00 20 60 00 00 72 02 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QMouseEvent' 1: /home/marc/Qt/qtbase-build/include/QtGui/6.3.0/QtGui/private/../../../../../../qtbase/src/gui/kernel/qevent_p.h:92:74: runtime error: downcast of address 0x7fffca0e2720 which does not point to an object of type 'QMutableSinglePointEvent' 1: 0x7fffca0e2720: note: object is of type 'QMouseEvent' 1: 61 7f 00 00 20 04 01 b8 61 7f 00 00 05 00 00 01 01 00 00 e0 30 c6 00 00 20 60 00 00 72 02 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QMouseEvent' 1: /home/marc/Qt/qtbase/src/widgets/kernel/qapplication.cpp:2816:119: runtime error: member call on address 0x7fffca0e2720 which does not point to an object of type 'QMutableSinglePointEvent' 1: 0x7fffca0e2720: note: object is of type 'QMouseEvent' 1: 61 7f 00 00 20 04 01 b8 61 7f 00 00 05 00 00 01 01 00 00 e0 30 c6 00 00 20 60 00 00 72 02 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QMouseEvent' 1: /home/marc/Qt/qtbase-build/include/QtGui/6.3.0/QtGui/private/../../../../../../qtbase/src/gui/kernel/qevent_p.h:92:74: runtime error: downcast of address 0x7fffca0e4e80 which does not point to an object of type 'QMutableSinglePointEvent' 1: 0x7fffca0e4e80: note: object is of type 'QMouseEvent' 1: 61 7f 00 00 20 04 01 b8 61 7f 00 00 02 00 00 01 01 00 00 e0 f0 c5 00 00 20 60 00 00 72 02 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QMouseEvent' 1: /home/marc/Qt/qtbase/src/widgets/kernel/qwidgetwindow.cpp:659:109: runtime error: member call on address 0x7fffca0e4e80 which does not point to an object of type 'QMutableSinglePointEvent' 1: 0x7fffca0e4e80: note: object is of type 'QMouseEvent' 1: 61 7f 00 00 20 04 01 b8 61 7f 00 00 02 00 00 01 01 00 00 e0 f0 c5 00 00 20 60 00 00 72 02 00 00 1: ^~~~~~~~~~~~~~~~~~~~~~~ 1: vptr for 'QMouseEvent'
(all while executing tst_qtouchevent).
We need a different mechanism that doesn't rely on casting to a non-existing subclass. E.g. a friend class that holds a pointer to the event and that can reach into it to make changes.
Attachments
Issue Links
- relates to
-
QTBUG-99615 Most QMutableEventPoint usage depends on Undefined Behaviour
-
- Closed
-
- split to
-
QTBUG-133321 Provide QEventStorage to allow storing QEvent subclasses without exposing the copy operations as public API
-
- Open
-
For Gerrit Dashboard: QTBUG-99563 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
388486,3 | QGraphicsView: remove (last remaining?) user of QEvent::op= | dev | qt/qtbase | Status: NEW | +1 | 0 |
616629,1 | QMutable*Event: un-deprecate the copy operations | dev | qt/qtbase | Status: NEW | -1 | 0 |
603582,8 | Fix ubsan warning of illegal cast and illegal method call | dev | qt/qtbase | Status: MERGED | +2 | 0 |
603918,2 | Fix ubsan warning of illegal cast and illegal method call | 6.8 | qt/qtbase | Status: MERGED | +2 | 0 |