Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.4.2, 6.7.1
-
None
Description
When compiling with -fsanitize=address -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC, a program which uses the `QPromise` interface crashes with the following message:
/usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/debug/safe_iterator.h:314: In function: gnu_debug::_Safe_iterator::pointer gnu_debug::_Safe_iterator<std::_Rb_tree_const_iterator<std::pair<const int, QtPrivate::ResultItem>>, std::map<int, QtPrivate::ResultItem>, std::forward_iterator_tag>::operator->() const [_Iterator = std::_Rb_tree_const_iterator<std::pair<const int, QtPrivate::ResultItem>>, _Sequence = std::map<int, QtPrivate::ResultItem>, _Category = std::forward_iterator_tag] Error: attempt to dereference a singular (value-initialized) iterator. Objects involved in the operation: iterator "this" @ 0x7f8fdc409240 { type = std::_Rb_tree_const_iterator<std::pair<int const, QtPrivate::ResultItem> > (constant iterator); state = singular (value-initialized); } Aborted (core dumped)
Tested with clang15 and gcc13 on openSuSE Leap 15.5 (Qt 6.4.2) and Tumbleweed (Qt 6.7.1). Qt5 is not affected, using the undocumented QFutureInterface class.
Command line:
/usr/libexec/qt6/moc -o demo2.moc -i demo2.cpp g++ -fsanitize=address -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -g -O2 -I/usr/include/qt6 -I/usr/include/qt6/QtCore -odemo2 demo2.cpp -lQt6Core