pcbnew: vector out of bounds access when dragging via
Description
usr/include/c++/9/bits/stl_vector.h:1060: std::vector<_Tp, _Alloc>::const_reference std::vector<_Tp, _Alloc>::operator[](std::vector<_Tp, _Alloc>::size_type) const [with _Tp = VECTOR2<int>; _Alloc = std::allocator<VECTOR2<int> >; std::vector<_Tp, _Alloc>::const_reference = const VECTOR2<int>&; std::vector<_Tp, _Alloc>::size_type = long unsigned int]: Assertion '__builtin_expect(__n < this->size(), true)' failed.
Thread 1 "kicad" received signal SIGABRT, Aborted.
0x00007ffff6970625 in raise () from /lib64/libc.so.6
(gdb) bt
#0 0x00007ffff6970625 in raise () at /lib64/libc.so.6
#1 0x00007ffff69598d9 in abort () at /lib64/libc.so.6
#2 0x00007fff3282bc78 in () at /usr/bin/_pcbnew.kiface
#3 0x00007fff331207fb in PNS::dragCornerInternal(SHAPE_LINE_CHAIN const&, VECTOR2<int> const&) () at /usr/bin/_pcbnew.kiface
#4 0x00007fff33120fec in PNS::LINE::dragCorner45(VECTOR2<int> const&, int) () at /usr/bin/_pcbnew.kiface
#5 0x00007fff331636be in PNS::SHOVE::pushOrShoveVia(PNS::VIA*, VECTOR2<int> const&, int) () at /usr/bin/_pcbnew.kiface
#6 0x00007fff331640a5 in PNS::SHOVE::onCollidingVia(PNS::ITEM*, PNS::VIA*) () at /usr/bin/_pcbnew.kiface
#7 0x00007fff33168476 in PNS::SHOVE::shoveIteration(int) () at /usr/bin/_pcbnew.kiface
#8 0x00007fff331692d0 in PNS::SHOVE::shoveMainLoop() () at /usr/bin/_pcbnew.kiface
#9 0x00007fff3316bf40 in PNS::SHOVE::ShoveDraggingVia(PNS::VIA_HANDLE, VECTOR2<int> const&, PNS::VIA_HANDLE&) () at /usr/bin/_pcbnew.kiface
#10 0x00007fff33119059 in PNS::DRAGGER::dragShove(VECTOR2<int> const&) () at /usr/bin/_pcbnew.kiface
#11 0x00007fff330d291b in PNS::ROUTER::moveDragging(VECTOR2<int> const&, PNS::ITEM*) () at /usr/bin/_pcbnew.kiface
#12 0x00007fff330d2b4e in PNS::ROUTER::Move(VECTOR2<int> const&, PNS::ITEM*) () at /usr/bin/_pcbnew.kiface
#13 0x00007fff330e0a5c in ROUTER_TOOL::performDragging(int) () at /usr/bin/_pcbnew.kiface
#14 0x00007fff330e1a75 in ROUTER_TOOL::MainLoop(TOOL_EVENT const&) () at /usr/bin/_pcbnew.kiface
#15 0x00007fff33398f24 in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) () at /usr/bin/_pcbnew.kiface
#16 0x00005555558647a1 in make_fcontext ()
#17 0x000055556e545c90 in ()
#18 0x042f261003919a08 in ()
KiCad Version
Application: KiCad
Version: 5.99.0-unknown-r19293-ea71d9db, debug build
Libraries:
wxWidgets 3.0.4
libcurl/7.66.0 OpenSSL/1.1.1g-fips zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.41.0
Platform: Linux 5.7.9-100.fc31.x86_64 x86_64, 64 bit, Little endian, wxGTK
Build Info:
Date: Aug 5 2020 17:44:56
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.69.0
OCC: 7.4.0
Curl: 7.66.0
ngspice: 32
Compiler: GCC 9.3.1 with C++ ABI 1013
Build settings:
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCC=ON
KICAD_SPICE=ON
KICAD_STDLIB_DEBUG=OFF
KICAD_STDLIB_LIGHT_DEBUG=OFF
KICAD_SANITIZE=OFF