We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug ASan, fails with the unit vector refactor.
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Platform and version (please complete the following information):
Additional context
==98557==ERROR: AddressSanitizer: negative-size-param: (size=-8) #0 0x7fbc1be5ee31 in __interceptor_memmove /usr/src/debug/gcc/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:810 #1 0x56428e447425 in __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > > std::__copy_move_a<true, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > > >(__gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit *> > >) /usr/include/c++/12.1.1/bits/stl_algobase.h:431 #2 0x56428e447425 in __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > > std::move<__gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator <unit*> > > >(__gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >, __gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >) /usr/in clude/c++/12.1.1/bits/stl_algobase.h:652 #3 0x56428e447425 in std::vector<unit*, std::allocator<unit*> >::_M_erase(__gnu_cxx::__normal_iterator<unit**, std::vector<unit*, std::allocator<unit*> > >) /usr/include/c++/12.1.1/bits/vector.tcc:179 #4 0x56428e42dfa7 in std::vector<unit*, std::allocator<unit*> >::erase(__gnu_cxx::__normal_iterator<unit* const*, std::vector<unit*, std::allocator<unit*> > >) /usr/include/c++/12.1.1/bits/stl_vector.h:1530 #5 0x56428e42dfa7 in control_unit_killed(unit*) /home/pranav/freeciv/freeciv21/client/control.cpp:223 #6 0x56428e3eb1c9 in client_remove_unit(unit*) /home/pranav/freeciv/freeciv21/client/climisc.cpp:96 #7 0x56428e1c7d48 in handle_unit_remove(int) /home/pranav/freeciv/freeciv21/client/packhand.cpp:455 #8 0x56428f185b33 in client_handle_packet(packet_type, void const*) /home/pranav/freeciv/freeciv21/build/client/packhand_gen.cpp:181 #9 0x56428e3c139a in client_packet_input(void*, int) /home/pranav/freeciv/freeciv21/client/client_main.cpp:697 #10 0x56428e3fd6fc in input_from_server(QTcpSocket*) /home/pranav/freeciv/freeciv21/client/clinet.cpp:293 #11 0x56428e5b03c9 in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (fc_client::*)()>::call(void (fc_client::*)(), fc_client*, void**) /usr/include/qt/QtCore/qobjectdefs_impl.h:152 #12 0x56428e5b03c9 in void QtPrivate::FunctionPointer<void (fc_client::*)()>::call<QtPrivate::List<>, void>(void (fc_client::*)(), fc_client*, void**) /usr/include/qt/QtCore/qobjectdefs_impl.h:185 #13 0x56428e5b03c9 in QtPrivate::QSlotObject<void (fc_client::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt/QtCore/qobjectdefs_impl.h:418 #14 0x56428e5b03c9 in QtPrivate::QSlotObject<void (fc_client::*)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) /usr/include/qt/QtCore/qobjectdefs_impl.h:411 #15 0x7fbc1a8bd340 (/usr/lib/libQt5Core.so.5+0x2bd340) #16 0x7fbc1b551ddf (/usr/lib/libQt5Network.so.5+0xc2ddf) #17 0x7fbc1b568679 (/usr/lib/libQt5Network.so.5+0xd9679) #18 0x7fbc1b778b3b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (/usr/lib/libQt5Widgets.so.5+0x178b3b) #19 0x7fbc1a88cad7 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/usr/lib/libQt5Core.so.5+0x28cad7) #20 0x7fbc1a8d6185 (/usr/lib/libQt5Core.so.5+0x2d6185) #21 0x7fbc19239c6a in g_main_context_dispatch (/usr/lib/libglib-2.0.so.0+0x54c6a) #22 0x7fbc19290000 (/usr/lib/libglib-2.0.so.0+0xab000) #23 0x7fbc19237391 in g_main_context_iteration (/usr/lib/libglib-2.0.so.0+0x52391) #24 0x7fbc1a8d732b in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x2d732b) #25 0x7fbc1a88527b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/usr/lib/libQt5Core.so.5+0x28527b) #26 0x7fbc1a88fda8 in QCoreApplication::exec() (/usr/lib/libQt5Core.so.5+0x28fda8) #27 0x56428e57e889 in fc_client::fc_main(QApplication*) /home/pranav/freeciv/freeciv21/client/fc_client.cpp:155 #28 0x56428e61591c in ui_main() /home/pranav/freeciv/freeciv21/client/gui_main.cpp:97 #29 0x56428e3d58cc in client_main(int, char**) /home/pranav/freeciv/freeciv21/client/client_main.cpp:609 #30 0x7fbc1983f2cf (/usr/lib/libc.so.6+0x232cf) #31 0x7fbc1983f389 in __libc_start_main (/usr/lib/libc.so.6+0x23389) #32 0x56428e1c31b4 in _start (/home/pranav/freeciv/freeciv21/build/freeciv21-client+0x27351b4)
The text was updated successfully, but these errors were encountered:
Mostly introduced in #1188
Sorry, something went wrong.
Proper erase-remove in control_unit_killed
f6cd325
Eagerly waiting for std::erase in C++20. Closes longturn#1191.
b1f1881
Eagerly waiting for std::erase in C++20. Closes #1191.
lmoureaux
Successfully merging a pull request may close this issue.
Describe the bug
ASan, fails with the unit vector refactor.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Platform and version (please complete the following information):
Additional context
The text was updated successfully, but these errors were encountered: