From d75868d02ad37dce5806a8d1313b123ff6ce6c09 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Sun, 17 Jul 2016 13:37:22 +0200 Subject: 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 Reviewed-by: Frederik Gladhorn --- src/xmlpatterns/api/qxmlquery_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.1