Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
qpid-cpp-1.40.0
-
None
-
None
Description
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdangling-pointer=
[ 48%] Building CXX object src/CMakeFiles/qpidcommon.dir/qpid/AclHost.cpp.o In file included from /usr/include/c++/13/set:62, from /home/jdanek/repos/qpid/qpid-cpp/src/qpid/sys/epoll/EpollPoller.cpp:36: In member function ‘void std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::swap(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) [with _Key = qpid::sys::PollerHandle*; _Val = qpid::sys::PollerHandle*; _KeyOfValue = std::_Identity<qpid::sys::PollerHandle*>; _Compare = std::less<qpid::sys::PollerHandle*>; _Alloc = std::allocator<qpid::sys::PollerHandle*>]’, inlined from ‘void std::set<_Key, _Compare, _Alloc>::swap(std::set<_Key, _Compare, _Alloc>&) [with _Key = qpid::sys::PollerHandle*; _Compare = std::less<qpid::sys::PollerHandle*>; _Alloc = std::allocator<qpid::sys::PollerHandle*>]’ at /usr/include/c++/13/bits/stl_set.h:443:18, inlined from ‘void qpid::sys::HandleSet::cleanup()’ at /home/jdanek/repos/qpid/qpid-cpp/src/qpid/sys/epoll/EpollPoller.cpp:184:17: /usr/include/c++/13/bits/stl_tree.h:2092:36: error: storing the address of local variable ‘copy’ in ‘*MEM[(struct _Rb_tree_node_base * &)© + 16].std::_Rb_tree_node_base::_M_parent’ []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdangling-pointer=-Werror=dangling-pointer=]8;;] 2092 | __t._M_root()->_M_parent = __t._M_end(); | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ /home/jdanek/repos/qpid/qpid-cpp/src/qpid/sys/epoll/EpollPoller.cpp: In member function ‘void qpid::sys::HandleSet::cleanup()’: /home/jdanek/repos/qpid/qpid-cpp/src/qpid/sys/epoll/EpollPoller.cpp:183:29: note: ‘copy’ declared here 183 | std::set<PollerHandle*> copy; | ^~~~ /home/jdanek/repos/qpid/qpid-cpp/src/qpid/sys/epoll/EpollPoller.cpp:183:29: note: ‘copy.std::set<qpid::sys::PollerHandle*, std::less<qpid::sys::PollerHandle*>, std::allocator<qpid::sys::PollerHandle*> >::_M_t.std::_Rb_tree<qpid::sys::PollerHandle*, qpid::sys::PollerHandle*, std::_Identity<qpid::sys::PollerHandle*>, std::less<qpid::sys::PollerHandle*>, std::allocator<qpid::sys::PollerHandle*> >::_M_impl.std::_Rb_tree<qpid::sys::PollerHandle*, qpid::sys::PollerHandle*, std::_Identity<qpid::sys::PollerHandle*>, std::less<qpid::sys::PollerHandle*>, std::allocator<qpid::sys::PollerHandle*> >::_Rb_tree_impl<std::less<qpid::sys::PollerHandle*>, true>::<unnamed>.std::_Rb_tree_header::_M_header.std::_Rb_tree_node_base::_M_parent’ declared here