dive merge seems broken in latest master

Berthold Stoeger bstoeger at mail.tuwien.ac.at
Mon Oct 15 03:25:28 PDT 2018


On Monday, 15 October 2018 11:42:26 CEST Jan Mulder wrote:
> On 10/15/18 9:10 AM, Jan Mulder wrote:
> > On 10/15/18 9:06 AM, Berthold Stoeger wrote:
> >> On Monday, 15 October 2018 08:53:16 CEST Jan Mulder wrote:
> >>> Tried to reproduce things. As I do not have 2 DCs, I fake a second one
> >>> just by editing the ssrf XML. I cannot reproduce it (in this way).
> >> 
> >> I can trivially reproduce this by importing a divelog onto itself.
> >> Therefore,
> >> this should be easy to fix. I'm heading of to lecture now and will
> >> look at
> >> this in the later afternoon.
> > 
> > Yes, this produces a crash indeed. Not 100% sure this the same one.
> 
> Tried to make sense of this. The first attempt crashed immediately, but
> subsequent sessions did not. In the debugger, I saw that the trips dives
> list (double linked list it seems) is corrupted. Then I had a couple of
> runs the ended in an endless loop in the import on itself phase, and
> finally, all works ...
> 
> So, to me, it seems non-deterministic caused by memory corruption
> somewhere. Curious what the root cause here, but it does not feel "easy
> to fix" to me.

I'm quite sure that it is easy to fix, but I will only find time later this 
afternoon after work. Quite obviously, for example merge_weight_system_info() 
is broken. It should read as
        res->weight = a->weight;
        res->description = copy_string(a->description);
or similar.

Berthold




More information about the subsurface mailing list