Re: [PATCH 1/2] git-compat-util: st_add4: work around gcc 4.2.x compiler crash

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

 



On Mon, Mar 21, 2016 at 12:35:57AM -0400, Eric Sunshine wrote:

> Although changes by 5b442c4 (tree-diff: catch integer overflow in
> combine_diff_path allocation, 2016-02-19) are perfectly valid, they
> unfortunately trigger an internal compiler error in gcc 4.2.x:
> 
>     combine-diff.c: In function 'diff_tree_combined':
>     combine-diff.c:1391: internal compiler error: Segmentation fault: 11
> 
> Experimentation reveals that changing st_add4()'s argument evaluation
> order is sufficient to sidestep this problem.
> 
> Although st_add3() does not trigger the compiler bug, for style
> consistency, change its argument evaluation order to match.
> 
> Signed-off-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
> ---
>  git-compat-util.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Thanks for digging into this, the result is a really pleasant solution.
I think it's worth doing.

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