Re: [PATCH] update-index: Don't copy memory around

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

 



Stefan Beller <sbeller@xxxxxxxxxx> writes:

> ... though I do not understand
> why. This passes the test suite, so I wonder if this patch would be a subtle bug
> now.

I recall the last time I traced the code I noticed that the ce can
get passed to a codepath that causes its removal from update_one(),
and then the pathname itself (which used to be ce->name but remember
that ce is invalid already at that point!) is still used after ce is
removed, which was the reason why you would introduce a bug if you
stop copying the path. You may have to follow the code again a bit
closer to make sure but I am reasonably sure that was the reason.

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