PNS crash placing via

Bug #1747973 reported by Tomasz Wlostowski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Tomasz Wlostowski

Bug Description

version:

Application: kicad
Version: (2018-01-26 revision 7a6e3bf)-master, release build
Libraries:
    wxWidgets 3.0.2
    libcurl/7.47.0 GnuTLS/3.4.10 zlib/1.2.8 libidn/1.32 librtmp/2.3
Platform: Linux 4.13.0-32-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.2 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.58.0
    Curl: 7.47.0
    Compiler: Clang 4.0.0 with C++ ABI 1002

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=OFF
    KICAD_SCRIPTING_MODULES=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=OFF
    KICAD_SPICE=ON

#0 0x00007fffd34b7578 in PNS::NODE::followLine(PNS::SEGMENT*, bool, int&, int, VECTOR2<int>*, PNS::SEGMENT**, bool&, bool) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#1 0x00007fffd34b797e in PNS::NODE::AssembleLine(PNS::SEGMENT*, int*, bool) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#2 0x00007fffd34d7f40 in PNS::LINE_PLACER::simplifyNewLine(PNS::NODE*, PNS::SEGMENT*) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#3 0x00007fffd34d7d77 in PNS::LINE_PLACER::FixRoute(VECTOR2<int> const&, PNS::ITEM*) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#4 0x00007fffd34bfd9a in PNS::ROUTER::FixRoute(VECTOR2<int> const&, PNS::ITEM*) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#5 0x00007fffd34922fa in ROUTER_TOOL::performRouting() () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#6 0x00007fffd3496633 in ROUTER_TOOL::mainLoop(PNS::ROUTER_MODE) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#7 0x00007fffd3495557 in ROUTER_TOOL::RouteSingleTrace(TOOL_EVENT const&) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#8 0x00007fffd35db4ff in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#9 0x00007fffd36202b1 in make_fcontext () from /home/twl/Kicad-dev/kicad-build/release-master/kicad/_pcbnew.kiface
#10 0x0000000000000000 in ?? ()

Changed in kicad:
importance: Undecided → Critical
status: New → Confirmed
assignee: nobody → Tomasz Wlostowski (twlostow)
milestone: none → 5.0.0-rc1
Revision history for this message
Tomasz Wlostowski (twlostow) wrote :

debug build:
==30885==ERROR: AddressSanitizer: heap-use-after-free on address 0x6080003275f8 at pc 0x7fffdc56d903 bp 0x7fffcdbd4be0 sp 0x7fffcdbd4bd8
READ of size 4 at 0x6080003275f8 thread T0

    #0 0x7fffdc56d902 in SHAPE_SEGMENT::GetWidth() const /home/twl/Kicad-dev/kicad-git-master/include/geometry/shape_segment.h:82:16
    #1 0x7fffdc56d7c8 in PNS::SEGMENT::Width() const /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/./pns_segment.h:90:22
    #2 0x7fffdc626b5d in PNS::NODE::AssembleLine(PNS::SEGMENT*, int*, bool) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/pns_node.cpp:844:24
    #3 0x7fffdc6b0ca9 in PNS::LINE_PLACER::simplifyNewLine(PNS::NODE*, PNS::SEGMENT*) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/pns_line_placer.cpp:1105:21
    #4 0x7fffdc6b06a1 in PNS::LINE_PLACER::FixRoute(VECTOR2<int> const&, PNS::ITEM*) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/pns_line_placer.cpp:1025:9
    #5 0x7fffdc66d02d in PNS::ROUTER::FixRoute(VECTOR2<int> const&, PNS::ITEM*) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/pns_router.cpp:350:24
    #6 0x7fffdc598efa in ROUTER_TOOL::performRouting() /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/router_tool.cpp:733:27
    #7 0x7fffdc59e839 in ROUTER_TOOL::mainLoop(PNS::ROUTER_MODE) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/router_tool.cpp:910:17
    #8 0x7fffdc59bf94 in ROUTER_TOOL::RouteSingleTrace(TOOL_EVENT const&) /home/twl/Kicad-dev/kicad-git-master/pcbnew/router/router_tool.cpp:832:12
    #9 0x7fffdc5a766a in int std::_Mem_fn_base<int (ROUTER_TOOL::*)(TOOL_EVENT const&), true>::operator()<TOOL_EVENT const&, void>(ROUTER_TOOL*, TOOL_EVENT const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:600:11
    #10 0x7fffdc5a74fd in int std::_Bind<std::_Mem_fn<int (ROUTER_TOOL::*)(TOOL_EVENT const&)> (ROUTER_TOOL*, std::_Placeholder<1>)>::__call<int, TOOL_EVENT const&, 0ul, 1ul>(std::tuple<TOOL_EVENT const&>&&, std::_Index_tuple<0ul, 1ul>) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1073:11
    #11 0x7fffdc5a72d8 in int std::_Bind<std::_Mem_fn<int (ROUTER_TOOL::*)(TOOL_EVENT const&)> (ROUTER_TOOL*, std::_Placeholder<1>)>::operator()<TOOL_EVENT const&, int>(TOOL_EVENT const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1131:17
    #12 0x7fffdc5a6e01 in std::_Function_handler<int (TOOL_EVENT const&), std::_Bind<std::_Mem_fn<int (ROUTER_TOOL::*)(TOOL_EVENT const&)> (ROUTER_TOOL*, std::_Placeholder<1>)> >::_M_invoke(std::_Any_data const&, TOOL_EVENT const&) /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:1856:9
    #13 0x7fffdca70718 in std::function<int (TOOL_EVENT const&)>::operator()(TOOL_EVENT const&) const /usr/bin/../lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/functional:2267:14
    #14 0x7fffdca7027a in COROUTINE<int, TOOL_EVENT const&>::callerStub(long) /home/twl/Kicad-dev/kicad-git-master/include/tool/coroutine.h:329:25
    #15 0x7fffdcb5aed0 in make_fcontext (/home/twl/Kicad-dev/kicad-build/debug-master/kicad/_pcbnew.kiface+0x1cbeed0)

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision c0b61c19b72261eef500ed7a41c1b54d02fc7429
https://git.launchpad.net/kicad/patch/?id=c0b61c19b72261eef500ed7a41c1b54d02fc7429

Changed in kicad:
status: Confirmed → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.