[PATCH v2 0/4] reflog-walk fixes for maint

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

 



On Wed, Jul 05, 2017 at 03:55:08AM -0400, Jeff King wrote:

> The first patch is my original small fix with an extra test. I think
> that would be appropriate for 'maint'. Its behavior still has some
> quirks, but it avoids the confusion that you experienced and has a low
> risk of breaking anything else.
> 
> The rest of it replaces the fake-parent thing with a more
> straight-forward iteration over the reflogs (i.e., a cleanup of the
> further patches I've been posting). After digging into it and especially
> after writing the new tests, I think I've convinced myself that this is
> the right way forward.

Here's an updated version of the bug-fix patch, along with the fix for
the problem that Eric noticed, and some other problems I noticed while
fixing that one. So I've split these immediate fixes for maint off into
their own series.

These are based on maint itself, rather than Kyle's original commit that
introduces the double-null reflog, since some of the bugs came later in
the v2.13 cycle (if we really wanted to, we could split it again into
two more series, but I don't think it's worth the trouble).

  [1/4]: reflog-walk: skip over double-null oid due to HEAD rename

    This is the fix for the pseudo-truncation in v2.13, and is the same
    as the previous round.

  [2/4]: reflog-walk: duplicate strings in complete_reflogs list

    This fixes Eric's bug, and is the same as what I showed earlier.
    It's a triggerable use-after-free, which is why I think it's
    important to get it into maint.

  [3/4]: reflog-walk: don't free reflogs added to cache

    This is another use-after-free, though it's slightly harder to
    trigger.

  [4/4]: reflog-walk: include all fields when freeing complete_reflogs

    This one is an optional cleanup, but worth doing, I think.


 reflog-walk.c          | 33 +++++++++++++++++++++------------
 t/t1411-reflog-show.sh | 10 ++++++++++
 t/t3200-branch.sh      | 11 +++++++++++
 3 files changed, 42 insertions(+), 12 deletions(-)

-Peff



[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]

  Powered by Linux