← Back to team overview

kicad-developers team mailing list archive

Re: GCC 7.4 crash somehow related to backannotate


Hi Jon,
That's my code. Unfortunately I almost sleep. I don't see big
difference between using value_type and std::make_pair. I just tried
to be smart and used decltype to show that is the map pair. But it
doesn't change much.
Only thing I see now, that according documentation value type is
pair<const key_type,mapped_type>, but I don't think that const
qualifier will change much there.
If somebody knows better about that, please let me know, because I don't know :(

On Sat, 8 Feb 2020 at 19:33, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
> Hi all,
> I am running into a weird problem on GCC 7.4 / Ubuntu 18.04.1
> Master compiles just fine.  However, after rebasing onto latest master,
> my branch in MR90 causes an internal compiler segfault on
> eeschema/tools/backannotate.cpp:185
> I traced the offending line to 180.
> For some reason, this compiles OK without my extra commit, but with it, boom.
> I tried changing the line to a different method:
> m_pcbModules.insert( nearestItem,
>                     std::make_pair( path, std::make_shared<PCB_MODULE_DATA>( data ) ) );
> And now the compiler crash is gone and everything seems ok.
> 1) Anyone know what is going on here?
> 2) Any concerns with me changing that line accordingly?  I think the version with
> std::make_pair is more clear anyway.
> -Jon
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp

Follow ups