From: Eric Sunshine Date: Mon, 04 May 2015 03:30:39 GMT Subject: Re: [PATCH v10 0/4] cat-file: add support for "-allow-unknown-type" Message-ID: In-Reply-To: On Sun, May 3, 2015 at 10:55 PM, Eric Sunshine wrote: > On Sun, May 3, 2015 at 8:14 PM, Junio C Hamano wrote: >> Junio C Hamano writes: >> >>> Hmmmm... you do not seem to pass your own test. >>> >>> expecting success: >>> echo $bogus_type >expect && >>> git cat-file -t --allow-unknown-type $bogus_sha1 >actual && >>> test_cmp expect actual >>> >>> --- expect 2015-05-04 00:09:24.327335512 +0000 >>> +++ actual 2015-05-04 00:09:24.335335473 +0000 >>> @@ -1 +1 @@ >>> -abcdefghijklmnopqrstuvwxyz1234679 >>> +abcdefghijklmnopqrstuvwxyz123467abcdefghijklmnopqrstuvwxyz1234679 >>> not ok 86 - Type of broken object is correct when type is large >> >> Perhaps it would have a better chance of being correct with this >> squashed in. > > Interestingly, neither test passes on Mac OS X even with this fixup. > In fact, the git-hash-object invocation which computes/retrieves > 'bogus_sha1' with the extra long bogus type crashes with SIGABRT in > write_sha1_file_prepare(). Still investigating. It's a buffer overflow problem. I'm preparing a patch.