diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2016-07-17 13:37:22 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2016-07-19 07:11:41 +0000 |
commit | d75868d02ad37dce5806a8d1313b123ff6ce6c09 (patch) | |
tree | 27606967dc9e95b5f24501637a20306b8bbc8b0f /src/xmlpatterns/api/qxmlquery_p.h | |
parent | b4b17b2035ce38b1bf4d90458d4c64dc9551c733 (diff) | |
download | qtxmlpatterns-d75868d02ad37dce5806a8d1313b123ff6ce6c09.tar.gz |
Correct return type of QXmlQueryPrivate::staticContext()
As reported by UBSan:
qtbase/src/corelib/tools/qshareddata.h:167:13: runtime error: downcast of address 0x2ac9a801a410 which does not point to an object of type 'GenericStaticContext'
0x2ac9a801a410: note: object is of type 'QPatternist::StaticFocusContext'
00 00 00 00 28 95 b7 9d c9 2a 00 00 01 00 00 00 c9 2a 00 00 f0 a1 01 a8 c9 2a 00 00 70 fa 0b 02
^~~~~~~~~~~~~~~~~~~~~~~
vptr for 'QPatternist::StaticFocusContext'
I had no idea how the QExplicitlySharedDataPointer conversion
could ever compile, until I saw that this module defines
QT_ENABLE_QEXPLICITLYSHAREDDATAPOINTER_STATICCAST
which is, of course, utterly broken.
Change-Id: Ie392ba74438b6c75fde9fabe09f9b0e655489cd9
Reviewed-by: Tobias Koenig <tobias.koenig@kdab.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Diffstat (limited to 'src/xmlpatterns/api/qxmlquery_p.h')
-rw-r--r-- | src/xmlpatterns/api/qxmlquery_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/xmlpatterns/api/qxmlquery_p.h b/src/xmlpatterns/api/qxmlquery_p.h index 07f18fa..4f97af3 100644 --- a/src/xmlpatterns/api/qxmlquery_p.h +++ b/src/xmlpatterns/api/qxmlquery_p.h @@ -122,7 +122,7 @@ public: return m_variableLoader; } - inline QPatternist::GenericStaticContext::Ptr staticContext() + inline QPatternist::StaticContext::Ptr staticContext() { if(m_staticContext && m_expr) return m_staticContext; |