# [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)

7 messages from 2016-03-17 to 2016-03-21. Participants: Junio C Hamano, Torsten Bögershausen, Renato Botelho, Eric Sunshine, Jeff King.
Thread: https://gitlist.dev/t/41731

## Junio C Hamano, 2016-03-17 21:07

Subject: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <xmqqlh5gzuc8.fsf@gitster.mtv.corp.google.com>
URL: https://gitlist.dev/e/xmqqlh5gzuc8.fsf%40gitster.mtv.corp.google.com

```
The latest maintenance release Git v2.7.4 is now available at the
usual places.  The same set of bugfix patches from the current
'master' have been backported to older maintenance tracks and are
available as v2.4.11, v2.5.5 and v2.6.6.  These are to fix a heap
corruption / buffer overflow bug and users are strongly encouraged
to upgrade.  The fix has already been in the release candidate
v2.8.0-rc3 as well.

The tarballs are found at:

    https://www.kernel.org/pub/software/scm/git/

The following public repositories all have a copy of the 'v2.7.4'
tag and the 'maint' branch that the tag points at:

  url = https://kernel.googlesource.com/pub/scm/git/git
  url = git://repo.or.cz/alt-git.git
  url = git://git.sourceforge.jp/gitroot/git-core/git.git
  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
  url = https://github.com/gitster/git

----------------------------------------------------------------

Git v2.7.4 Release Notes
========================

Fixes since v2.7.3
------------------

 * Bugfix patches were backported from the 'master' front to plug heap
   corruption holes, to catch integer overflow in the computation of
   pathname lengths, and to get rid of the name_path API.  Both of
   these would have resulted in writing over an under-allocated buffer
   when formulating pathnames while tree traversal.

----------------------------------------------------------------

Changes since v2.7.3 are as follows:

Jeff King (7):
      add helpers for detecting size_t overflow
      tree-diff: catch integer overflow in combine_diff_path allocation
      http-push: stop using name_path
      show_object_with_name: simplify by using path_name()
      list-objects: convert name_path to a strbuf
      list-objects: drop name_path entirely
      list-objects: pass full pathname to callbacks

Junio C Hamano (4):
      Git 2.4.11
      Git 2.5.5
      Git 2.6.6
      Git 2.7.4

```

## Torsten Bögershausen, 2016-03-18 08:29

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <56EBBC72.7000201@web.de>
URL: https://gitlist.dev/e/56EBBC72.7000201%40web.de
In-Reply-To: <xmqqlh5gzuc8.fsf@gitster.mtv.corp.google.com>

```
> Git v2.7.4 Release Notes
> ========================
> 
> Fixes since v2.7.3
> ------------------
> 
>  * Bugfix patches were backported from the 'master' front to plug heap
>    corruption holes, to catch integer overflow in the computation of
>    pathname lengths, and to get rid of the name_path API.  Both of
>    these would have resulted in writing over an under-allocated buffer
>    when formulating pathnames while tree traversal.
> 
> ----------------------------------------------------------------
> 
> Changes since v2.7.3 are as follows:
> 
> Jeff King (7):
>       add helpers for detecting size_t overflow
>       tree-diff: catch integer overflow in combine_diff_path allocation
>       http-push: stop using name_path
>       show_object_with_name: simplify by using path_name()
>       list-objects: convert name_path to a strbuf
>       list-objects: drop name_path entirely
>       list-objects: pass full pathname to callbacks
> 
If there is a new 2.7.x release, does it make sense to cherry-pick this one:

commit 7b6daf8d2fee1a9866b1d4eddbfaa5dbc42c5dbb
Author: Torsten BÃ¶gershausen <tboegi@web.de>
Date:   Sun Feb 28 21:09:44 2016 +0100

    config.mak.uname: use clang for Mac OS X 10.6
    

```

## Renato Botelho, 2016-03-20 15:32

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <680C4CDE-233E-4603-B3F1-D68EB126620F@FreeBSD.org>
URL: https://gitlist.dev/e/680C4CDE-233E-4603-B3F1-D68EB126620F%40FreeBSD.org
In-Reply-To: <xmqqlh5gzuc8.fsf@gitster.mtv.corp.google.com>

```
> On Mar 17, 2016, at 18:07, Junio C Hamano <gitster@pobox.com> wrote:
> 
> The latest maintenance release Git v2.7.4 is now available at the
> usual places.  The same set of bugfix patches from the current
> 'master' have been backported to older maintenance tracks and are
> available as v2.4.11, v2.5.5 and v2.6.6.  These are to fix a heap
> corruption / buffer overflow bug and users are strongly encouraged
> to upgrade.  The fix has already been in the release candidate
> v2.8.0-rc3 as well.
> 
> The tarballs are found at:
> 
>    https://www.kernel.org/pub/software/scm/git/
> 
> The following public repositories all have a copy of the 'v2.7.4'
> tag and the 'maint' branch that the tag points at:
> 
>  url = https://kernel.googlesource.com/pub/scm/git/git
>  url = git://repo.or.cz/alt-git.git
>  url = git://git.sourceforge.jp/gitroot/git-core/git.git
>  url = git://git-core.git.sourceforge.net/gitroot/git-core/git-core
>  url = https://github.com/gitster/git
> 
> ----------------------------------------------------------------
> 
> Git v2.7.4 Release Notes
> ========================
> 
> Fixes since v2.7.3
> ------------------
> 
> * Bugfix patches were backported from the 'master' front to plug heap
>   corruption holes, to catch integer overflow in the computation of
>   pathname lengths, and to get rid of the name_path API.  Both of
>   these would have resulted in writing over an under-allocated buffer
>   when formulating pathnames while tree traversal.
> 
> ----------------------------------------------------------------
> 
> Changes since v2.7.3 are as follows:
> 
> Jeff King (7):
>      add helpers for detecting size_t overflow
>      tree-diff: catch integer overflow in combine_diff_path allocation
>      http-push: stop using name_path
>      show_object_with_name: simplify by using path_name()
>      list-objects: convert name_path to a strbuf
>      list-objects: drop name_path entirely
>      list-objects: pass full pathname to callbacks
> 
> Junio C Hamano (4):
>      Git 2.4.11
>      Git 2.5.5
>      Git 2.6.6
>      Git 2.7.4

FYI,

2.7.4 fails to build on FreeBSD 9.x, that uses by default gcc 4.2.1. I’ve fixed it adding an extra dependency to make force it to require gcc 4.8+. Here is the output:

cc -o combine-diff.o -c -MF ./.depend/combine-diff.o.d -MQ combine-diff.o -MMD -MP -isystem/usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -I/usr/include -DUSE_ST_TIMESPEC -pthread -DHAVE_PATHS_H -DHAVE_STRINGS_H -DGMTIME_UNRELIABLE_ERRORS -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DSHA1_HEADER='<openssl/sha.h>'  -DDIR_HAS_BSD_GROUP_SEMANTICS -DSHELL_PATH='"/bin/sh"'  combine-diff.c
combine-diff.c: In function 'diff_tree_combined':
combine-diff.c:1391: internal compiler error: Segmentation fault: 11
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Makefile:1924: recipe for target 'combine-diff.o' failed
gmake: *** [combine-diff.o] Error 1
*** [do-build] Error code 1

--
Renato Botelho

```

## Eric Sunshine, 2016-03-20 17:07

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <CAPig+cSOjFqcKGaZC1HWGdp7aCg7Dog1GvFYPYRbShARPm9ODQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcSOjFqcKGaZC1HWGdp7aCg7Dog1GvFYPYRbShARPm9ODQ%40mail.gmail.com
In-Reply-To: <680C4CDE-233E-4603-B3F1-D68EB126620F@FreeBSD.org>

```
[cc:+peff]

On Sun, Mar 20, 2016 at 11:32 AM, Renato Botelho <garga@freebsd.org> wrote:
>> On Mar 17, 2016, at 18:07, Junio C Hamano <gitster@pobox.com> wrote:
>> Git v2.7.4 Release Notes
>>
>> Junio C Hamano (4):
>>      Git 2.4.11
>>      Git 2.5.5
>>      Git 2.6.6
>>      Git 2.7.4
>
> FYI,
>
> 2.7.4 fails to build on FreeBSD 9.x, that uses by default gcc 4.2.1. I’ve fixed it adding an extra dependency to make force it to require gcc 4.8+. Here is the output:
>
> cc -o combine-diff.o -c -MF ./.depend/combine-diff.o.d -MQ combine-diff.o -MMD -MP -isystem/usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -I/usr/include -DUSE_ST_TIMESPEC -pthread -DHAVE_PATHS_H -DHAVE_STRINGS_H -DGMTIME_UNRELIABLE_ERRORS -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DSHA1_HEADER='<openssl/sha.h>'  -DDIR_HAS_BSD_GROUP_SEMANTICS -DSHELL_PATH='"/bin/sh"'  combine-diff.c
> combine-diff.c: In function 'diff_tree_combined':
> combine-diff.c:1391: internal compiler error: Segmentation fault: 11
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> Makefile:1924: recipe for target 'combine-diff.o' failed
> gmake: *** [combine-diff.o] Error 1
> *** [do-build] Error code 1

Interesting. This appears to be the same bug as [1].

[1]: http://thread.gmane.org/gmane.comp.version-control.git/287486/focus=287789

```

## Jeff King, 2016-03-20 19:43

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <20160320194313.GB6288@sigill.intra.peff.net>
URL: https://gitlist.dev/e/20160320194313.GB6288%40sigill.intra.peff.net
In-Reply-To: <CAPig+cSOjFqcKGaZC1HWGdp7aCg7Dog1GvFYPYRbShARPm9ODQ@mail.gmail.com>

```
On Sun, Mar 20, 2016 at 01:07:52PM -0400, Eric Sunshine wrote:

> On Sun, Mar 20, 2016 at 11:32 AM, Renato Botelho <garga@freebsd.org> wrote:
> >> On Mar 17, 2016, at 18:07, Junio C Hamano <gitster@pobox.com> wrote:
> >> Git v2.7.4 Release Notes
> >>
> >> Junio C Hamano (4):
> >>      Git 2.4.11
> >>      Git 2.5.5
> >>      Git 2.6.6
> >>      Git 2.7.4
> >
> > FYI,
> >
> > 2.7.4 fails to build on FreeBSD 9.x, that uses by default gcc 4.2.1. I’ve fixed it adding an extra dependency to make force it to require gcc 4.8+. Here is the output:
> >
> > cc -o combine-diff.o -c -MF ./.depend/combine-diff.o.d -MQ combine-diff.o -MMD -MP -isystem/usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -I. -I/usr/local/include -I/usr/local/include -DUSE_CURL_FOR_IMAP_SEND -I/usr/include -DUSE_ST_TIMESPEC -pthread -DHAVE_PATHS_H -DHAVE_STRINGS_H -DGMTIME_UNRELIABLE_ERRORS -DHAVE_CLOCK_GETTIME -DHAVE_CLOCK_MONOTONIC -DHAVE_BSD_SYSCTL -DHAVE_GETDELIM -DSHA1_HEADER='<openssl/sha.h>'  -DDIR_HAS_BSD_GROUP_SEMANTICS -DSHELL_PATH='"/bin/sh"'  combine-diff.c
> > combine-diff.c: In function 'diff_tree_combined':
> > combine-diff.c:1391: internal compiler error: Segmentation fault: 11
> > Please submit a full bug report,
> > with preprocessed source if appropriate.
> > See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> > Makefile:1924: recipe for target 'combine-diff.o' failed
> > gmake: *** [combine-diff.o] Error 1
> > *** [do-build] Error code 1
> 
> Interesting. This appears to be the same bug as [1].
> 
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/287486/focus=287789

Yes. AFAICT that version of gcc is simply buggy, and we are not doing
anything illegal or even particularly exotic. Given how old it is, I'm
not sure it's worth worrying too much about it, but I am happy to work
around it if somebody can figure out how to do so.

I spent some time trying to bisect gcc, but had trouble getting a
working build for a gcc that old.

-Peff

```

## Eric Sunshine, 2016-03-21 04:41

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <CAPig+cR7d0UF08fQy5uXW8U+7rdjGSO1drMxm6LOV-KB40mwPw@mail.gmail.com>
URL: https://gitlist.dev/e/CAPig%2BcR7d0UF08fQy5uXW8U%2B7rdjGSO1drMxm6LOV-KB40mwPw%40mail.gmail.com
In-Reply-To: <20160320194313.GB6288@sigill.intra.peff.net>

```
[cc:+Torsten]

On Sun, Mar 20, 2016 at 3:43 PM, Jeff King <peff@peff.net> wrote:
> On Sun, Mar 20, 2016 at 01:07:52PM -0400, Eric Sunshine wrote:
>> On Sun, Mar 20, 2016 at 11:32 AM, Renato Botelho <garga@freebsd.org> wrote:
>> > 2.7.4 fails to build on FreeBSD 9.x, that uses by default gcc 4.2.1. I’ve fixed it adding an extra dependency to make force it to require gcc 4.8+. Here is the output:
>> >
>> > combine-diff.c: In function 'diff_tree_combined':
>> > combine-diff.c:1391: internal compiler error: Segmentation fault: 11
>>
>> Interesting. This appears to be the same bug as [1].
>>
>> [1]: http://thread.gmane.org/gmane.comp.version-control.git/287486/focus=287789
>
> Yes. AFAICT that version of gcc is simply buggy, and we are not doing
> anything illegal or even particularly exotic. Given how old it is, I'm
> not sure it's worth worrying too much about it, but I am happy to work
> around it if somebody can figure out how to do so.
>
> I spent some time trying to bisect gcc, but had trouble getting a
> working build for a gcc that old.

I installed FreeBSD 9 and managed to reproduce the compiler crash.
After a bit of experimentation, I devised a simple work-around and
submitted it as a patch[1].

[1]: http://thread.gmane.org/gmane.comp.version-control.git/289397

```

## Renato Botelho, 2016-03-21 13:33

Subject: Re: [ANNOUNCE] Git v2.7.4 (and updates to older maintenance tracks)
Message-ID: <2342B066-CDD4-4EA6-8AB4-AC093AAF4DA7@FreeBSD.org>
URL: https://gitlist.dev/e/2342B066-CDD4-4EA6-8AB4-AC093AAF4DA7%40FreeBSD.org
In-Reply-To: <CAPig+cR7d0UF08fQy5uXW8U+7rdjGSO1drMxm6LOV-KB40mwPw@mail.gmail.com>

```
> On Mar 21, 2016, at 01:41, Eric Sunshine <sunshine@sunshineco.com> wrote:
> 
> [cc:+Torsten]
> 
> On Sun, Mar 20, 2016 at 3:43 PM, Jeff King <peff@peff.net> wrote:
>> On Sun, Mar 20, 2016 at 01:07:52PM -0400, Eric Sunshine wrote:
>>> On Sun, Mar 20, 2016 at 11:32 AM, Renato Botelho <garga@freebsd.org> wrote:
>>>> 2.7.4 fails to build on FreeBSD 9.x, that uses by default gcc 4.2.1. I’ve fixed it adding an extra dependency to make force it to require gcc 4.8+. Here is the output:
>>>> 
>>>> combine-diff.c: In function 'diff_tree_combined':
>>>> combine-diff.c:1391: internal compiler error: Segmentation fault: 11
>>> 
>>> Interesting. This appears to be the same bug as [1].
>>> 
>>> [1]: http://thread.gmane.org/gmane.comp.version-control.git/287486/focus=287789
>> 
>> Yes. AFAICT that version of gcc is simply buggy, and we are not doing
>> anything illegal or even particularly exotic. Given how old it is, I'm
>> not sure it's worth worrying too much about it, but I am happy to work
>> around it if somebody can figure out how to do so.
>> 
>> I spent some time trying to bisect gcc, but had trouble getting a
>> working build for a gcc that old.
> 
> I installed FreeBSD 9 and managed to reproduce the compiler crash.
> After a bit of experimentation, I devised a simple work-around and
> submitted it as a patch[1].
> 
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/289397

Thank you! That works fine.
--
Renato Botelho

```
