Re: Infinite loop + memory leak in annotate_refs_with_symref_info
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Apr 11, 2023, 21:22 UTC
- Message-ID
- <ZDXPemH0d3YWnpjL@nand.local>
- In-Reply-To
- <20230411211604.GB626331@coredump.intra.peff.net>
On Tue, Apr 11, 2023 at 05:16:04PM -0400, Jeff King wrote:
Show 16 quoted lines
> On Tue, Apr 11, 2023 at 05:06:33PM -0400, Jeff King wrote: > > > On Tue, Apr 11, 2023 at 10:53:59PM +0300, Jonas Haag wrote: > > > > > There is an infinite loop with an accompanying memory leak in > > > annotate_refs_with_symref_info that was introduced in Git 2.28 (I > > > think in commit 2c6a403: “connect: add function to parse multiple v1 > > > capability values”). > > > > Have you tried to reproduce with a more recent version of Git? This > > sounds a lot like the bug fixed in 44d2aec6e8 (connect: also update > > offset for features without values, 2021-09-26), which is in v2.33.1. > > Never mind. I was able to reproduce (I never used klaus, but it's > packaged for Debian, so it was pretty easy to do). And yes, the problem > still exists today. And bisection confirms it's from 2c6a403.
Yeah, same here. I hadn't used it either, but it's easily installable via pip, too. Indeed, you can see the value of *offset jumping backwards in `connect.c::parse_value_value()` (whose caller in this case is `connect.c::annotate_refs_with_symref_info()`).
Thanks, Taylor