rhill       15/07/19 10:14:07

  Added:                tcsh-6.18.01-gcc5.patch
  Log:
  Fix hang with gcc-5 (bug #545176).
  
  Signed-off-by: Ryan Hill <rh...@gentoo.org>
  (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 
957A8463)

Revision  Changes    Path
1.1                  app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch?rev=1.1&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-shells/tcsh/files/tcsh-6.18.01-gcc5.patch?rev=1.1&content-type=text/plain

Index: tcsh-6.18.01-gcc5.patch
===================================================================
https://bugs.gentoo.org/545176
http://mx.gw.com/pipermail/tcsh-bugs/2015-May/000945.html
https://github.com/tcsh-org/tcsh/commit/624d3aebb6e6afadb4f35e894d11b5ebe290cd87

>From 624d3aebb6e6afadb4f35e894d11b5ebe290cd87 Mon Sep 17 00:00:00 2001
From: christos <christos>
Date: Thu, 28 May 2015 11:47:03 +0000
Subject: [PATCH] avoid gcc-5 optimization malloc + memset = calloc (Fridolin
 Pokorny)

---
 tc.alloc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

--- a/tc.alloc.c
+++ b/tc.alloc.c
@@ -348,10 +348,13 @@ calloc(size_t i, size_t j)
 {
 #ifndef lint
     char *cp;
+    volatile size_t k;
 
     i *= j;
     cp = xmalloc(i);
-    memset(cp, 0, i);
+    /* Stop gcc 5.x from optimizing malloc+memset = calloc */
+    k = i;
+    memset(cp, 0, k);
 
     return ((memalign_t) cp);
 #else




Reply via email to