Re: [PATCH] Must not modify the_index.cache as it may be passed to realloc at some point.
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Oct 3, 2007, 05:55 UTC
- Message-ID
- <7vtzp8g2s2.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <1191390255.16292.2.camel@koto.keithp.com>
Keith Packard <keithp@keithp.com> writes:
> The index cache is not static, growing as new entries are added. If entries > are added after prune_cache is called, cache will no longer point at the > base of the allocation, and realloc will not be happy.
Thanks for catching this. This code originally was perfectly Ok, but I broke it with the overlay_tree() change.