Details
Description
Steps to reproduce:
1) configure Qt build with CXXFLAGS='-D_GLIBCXX_DEBUG' and build it
2) run the sharedmemory example (qtbase/examples/corelib/ipc/sharedmemory/sharedmemory)
3) Click on the "Load Image from File..." button
Result:
Crash. This is shown on stderr:
usr/include/c++/13/debug/safe_iterator.h:492: In function: bool gnu_debug::operator!=(const _Safe_iterator<std::_Rb_tree_const_iterator<std::pair<const QSettingsKey, QVariant> >, std::debug::map<QSettingsKey, QVariant, std::less<QSettingsKey>, std::allocator<std::pair<const QSettingsKey, QVariant> > >, std::forward_iterator_tag>::_Self&, const _Safe_iterator<std::_Rb_tree_const_iterator<std::pair<const QSettingsKey, QVariant> >, std::debug::map<QSettingsKey, QVariant, std::less<QSettingsKey>, std::allocator<std::pair<const QSettingsKey, QVariant> > >, std::forward_iterator_tag>::_Self&)Error: attempt to compare a singular iterator to a singular (value-initialized) iterator.Objects involved in the operation: iterator "lhs" @ 0x7ffe8e811550 { type = std::_Rb_tree_const_iterator<std::pair<QSettingsKey const, QVariant> > (constant iterator); state = singular; } iterator "rhs" @ 0x7ffe8e811670 { type = std::_Rb_tree_const_iterator<std::pair<QSettingsKey const, QVariant> > (constant iterator); state = singular (value-initialized); } Aborted (core dumped)
Attachments
For Gerrit Dashboard: QTBUG-119044 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
517336,5 | Don't reuse iterator var to avoid -D_GLIBCXX_DEBUG crash | dev | qt/qtbase | Status: MERGED | +2 | 0 |
518101,2 | Don't reuse iterator var to avoid -D_GLIBCXX_DEBUG crash | 6.6 | qt/qtbase | Status: MERGED | +2 | 0 |
518227,2 | Don't reuse iterator var to avoid -D_GLIBCXX_DEBUG crash | tqtc/lts-6.5 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |