[BUG] git rev-list --missing=allow-promisor

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

 



Steps to reproduce:
1. Create a git repository with missing+promised blobs.
For example, I did this:
git clone git@xxxxxxxxxx:git/git.git git-no-blobs --filter=blob:none
--depth=1 --bare

--filter=blob:none - don't fetch any blobs
--depth=1 - we don't need git's entire history, just one commit is fine
--bare - this avoids git fetching any blobs as part of the checkout operation

2. In this repository, run:
git rev-list HEAD --objects --missing=allow-promisor

Expected outcome:
git rev-list prints the paths and OIDs of all the objects

Actual outcome:
Any of the following:
a) git rev-list prints the paths and OIDs of all the objects
b) git rev-list fails with "fatal: malformed mode in tree entry"
c) git rev-list fails with "fatal: too-short tree object"

Diagnosis:
With missing=allow-promisor, when git encounters a missing object, it
calls is_promisor on it, which in turn calls add_promisor_object on
lots of things.
In this line in add_promisor_object, the buffer of the tree that we
are currently traversing is freed:
https://github.com/git/git/blob/master/packfile.c#L2242
This clearly causes problems but not in a deterministic way.



[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