[PATCH 0/2] pack-objects: more brown-paper-bag multi-pack reuse fixes

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

 



While starting to use multi-pack reuse in more places throughout
GitHub, I noticed a rare but persistent segfault, which is the result
of a broken assumption in write_reused_pack_verbatim().

The first patch demonstrates the problem, and the second patch fixes
it.  The second patch explains the broken assumption in detail, but
the gist is that we can't infer that an all-1s word in the reuse
bitmap from a non-preferred pack means that we want all objects
between the ones corresponding to the first and last bit.

I'm fairly disappointed that I didn't catch this obviously-broken
implementation during the original development of this feature, or in
the first round of bugfixes. But these patches should conclusively
resolve at least this issue.

Thanks in advance for your review!

Taylor Blau (2):
  t5332-multi-pack-reuse.sh: demonstrate duplicate packing failure
  pack-objects: only perform verbatim reuse on the preferred pack

 builtin/pack-objects.c      | 101 +++++++++++++++---------------------
 t/t5332-multi-pack-reuse.sh |  23 ++++++++
 2 files changed, 66 insertions(+), 58 deletions(-)


base-commit: 25b0f41288718625b18495de23cc066394c09a92
-- 
2.46.0.421.g159f2d50e75




[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