← Back to team overview

kicad-developers team mailing list archive

Re: About Bug 1604841: Pcbnew crash at moving via, and boost::context fixes to make it compatible with boost 1.61

 

Le 02/08/2016 à 02:26, Michael Steinberg a écrit :
> Hello all,
> 
> attached is v2 of the crash fix. My original patch would move the function out of the transition
> before a copy of it could be pushed to the state stack.
> 
> The second patch refactors coroutine, mostly for clarification and correctness purposes. A few
> documentation hints were added. It also removes many unnecessary heap allocations of single
> pointers. I compiled and tested it with boost 1.54, 1.60 and 1.61. Compile- and runtime-tests on
> these and other boost versions would be very welcome, this stuff is very brittle! I'm almost at a
> point having the tree duplicated for every boost version, for not having to recompile kicad
> completely when switching them...
> 
> Michael

Hi Michael,
I just test your new fix on 3 installs :
W7 32 bits & boost 1.60, Linux Kubuntu 14.04LTS & boost 1.54,  Linux Ubuntu 16.04 & boost 1.58.

All work fine after applying the new patch. (All crashed before the patch)
(I do not have an installed version of boost 1.61)

Really thanks. This is the type of issue very tricky to fix.

I also tested your refactor without issue.
Just I had a compil warning on Linux (attached the small file)


-- 
Jean-Pierre CHARRAS
In file included from /home/jpc/kicad-launchpad/testing/common/tool/tool_manager.cpp:45:0:
/home/jpc/kicad-launchpad/testing/include/tool/coroutine.h: In instantiation of 'COROUTINE<ReturnType, ArgType>::COROUTINE(std::function<ReturnType(ArgType)>) [with ReturnType = int; ArgType = const TOOL_EVENT&]':
/home/jpc/kicad-launchpad/testing/common/tool/tool_manager.cpp:541:96:   required from here
/home/jpc/kicad-launchpad/testing/include/tool/coroutine.h:332:19: warning: 'COROUTINE<int, const TOOL_EVENT&>::m_callee' will be initialized after [-Wreorder]
     context_type* m_callee;
                   ^
/home/jpc/kicad-launchpad/testing/include/tool/coroutine.h:325:16: warning:   'int COROUTINE<int, const TOOL_EVENT&>::m_retVal' [-Wreorder]
     ReturnType m_retVal;
                ^
/home/jpc/kicad-launchpad/testing/include/tool/coroutine.h:123:5: warning:   when initialized here [-Wreorder]
     COROUTINE( std::function<ReturnType(ArgType)> aEntry ) :
     ^

References