Re: [BUG] diffcore-rename with duplicate tree entries can segfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff King <peff@xxxxxxxx> writes:

> But we can also do that with a hash table, or an auxiliary sorted array.
> And sure enough, that's exactly what the rename_dst array is.
> ...
> which I think is a pretty simple and sane fix.

Yeah, good observation.

> So to go forward, I'm happy to prepare a patch, but I'd like to know:
>
>   1. Does something like the above look reasonable to you (I'd probably
>      refactor it to avoid the bizarre return value semantics from
>      locate_rename_dst, though)?
>
>   2. If so, do you want something minimal like what's above, or do you
>      mind if I build it on top of a hashmap conversion? I suspect the
>      logic may also end up more clear with the hashmap (since inserting
>      versus lookup will be more distinct in the callers).

No, I don't mind.  The diff-b-m topic seems to need a lot deeper
rethink than I originally anticipated anyway, and it can wait for a
clean-up to use hashmap to stabilize.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]