control: tag -1 + fixed-upstream

On 2015-06-25 13:46, Thomas Lange wrote:
> During this years Debconf I will work on this bug.
> 
> There's a thread about this bug at
> http://mx.gw.com/pipermail/tcsh-bugs/2015-May/000930.html

Indeed, and the fix discussed there has been committed upstream. Please
find attached the extract patch to be put in debian/patches.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurel...@aurel32.net                 http://www.aurel32.net
commit 05e7406049bd2686dee0ee8d819dcd38eb131f6f
Author: christos <christos>
Date:   Tue Jul 7 12:24:54 2015 +0000

    make k volatile to prevent gcc-5 memset() optimization (Fridolin Pokorny)

commit 624d3aebb6e6afadb4f35e894d11b5ebe290cd87
Author: christos <christos>
Date:   Thu May 28 11:47:03 2015 +0000

    avoid gcc-5 optimization malloc + memset = calloc (Fridolin Pokorny)

--- a/tc.alloc.c
+++ b/tc.alloc.c
@@ -345,10 +345,13 @@
 {
 #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