aboutsummaryrefslogtreecommitdiffstats
path: root/features
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2022-04-22 12:02:33 -0700
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-05-26 10:57:41 +0000
commitc83b3b6e85a218022d94db298fea93c5b0b0834d (patch)
treeba9c425eb599106c68a03e2abd1b9c5e72b5906e /features
parent860086be0e1886ad927afe65c5f4f99524536a60 (diff)
Fix build with GCC12: apparently incorrect use-after-free warning
GCC12 is complaining about a use-after-free here, but I don't see it. In member function ‘void QQmlContextData::release() const’, inlined from ‘QQmlRefPointer<T>::~QQmlRefPointer() [with T = QQmlContextData]’ at ftw/qqmlrefcount_p.h:181:22, inlined from ‘bool {anonymous}::contextHasNoExtensions(const QQmlRefPointer<QQmlContextData>&)’ at qqmlpropertycache.cpp:658:29, inlined from ‘const QQmlPropertyData* QQmlPropertyCache::findProperty(QLinkedStringMultiHash<std::pair<int, QQmlPropertyData*> >::ConstIterator, const QQmlVMEMetaObject*, const QQmlRefPointer<QQmlContextData>&) const’ at qqmlpropertycache.cpp:683:56: qqmlcontextdata_p.h:88:34: error: pointer used after ‘void operator delete(void*, std::size_t)’ [-Werror=use-after-free] 88 | void release() const { if (--m_refCount == 0) delete this; } | ^~~~~~~~~~ In member function ‘void QQmlContextData::release() const’, inlined from ‘QQmlRefPointer<T>::~QQmlRefPointer() [with T = QQmlContextData]’ at ftw/qqmlrefcount_p.h:181:22, inlined from ‘bool {anonymous}::contextHasNoExtensions(const QQmlRefPointer<QQmlContextData>&)’ at qqmlpropertycache.cpp:658:51, inlined from ‘const QQmlPropertyData* QQmlPropertyCache::findProperty(QLinkedStringMultiHash<std::pair<int, QQmlPropertyData*> >::ConstIterator, const QQmlVMEMetaObject*, const QQmlRefPointer<QQmlContextData>&) const’ at qqmlpropertycache.cpp:683:56: qqmlcontextdata_p.h:88:58: note: call to ‘void operator delete(void*, std::size_t)’ here 88 | void release() const { if (--m_refCount == 0) delete this; } | ^~~~ Change-Id: If05aeeb7176e4f13af9afffd16e84d54de676bc2 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit cafc60c3bfb2d60360b9ca536430e829f2daae96) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'features')
0 files changed, 0 insertions, 0 deletions