Add tcsh-6.19.00-gcc5-calloc.patch for gcc5 build

This commit is contained in:
Fridolin Pokorny 2015-05-28 12:35:08 +02:00
parent b5f32ffe2b
commit ea63b1ce0e
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,18 @@
diff --git a/tc.alloc.c b/tc.alloc.c
index b87f9e9..06e0405 100644
--- a/tc.alloc.c
+++ b/tc.alloc.c
@@ -348,10 +348,12 @@ calloc(size_t i, size_t j)
{
#ifndef lint
char *cp;
+ volatile size_t k;
i *= j;
cp = xmalloc(i);
- memset(cp, 0, i);
+ k = i;
+ memset(cp, 0, k);
return ((memalign_t) cp);
#else

View File

@ -1,7 +1,7 @@
Summary: An enhanced version of csh, the C shell Summary: An enhanced version of csh, the C shell
Name: tcsh Name: tcsh
Version: 6.19.00 Version: 6.19.00
Release: 1%{?dist} Release: 2%{?dist}
License: BSD License: BSD
Group: System Environment/Shells Group: System Environment/Shells
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz
@ -18,6 +18,8 @@ Patch11: tcsh-6.14.00-order.patch
Patch35: tcsh-6.18.01-elf-interpreter.patch Patch35: tcsh-6.18.01-elf-interpreter.patch
Patch36: tcsh-6.18.01-introduce-tcsh_posix_status.patch Patch36: tcsh-6.18.01-introduce-tcsh_posix_status.patch
Patch38: tcsh-6.18.01-skip-tty-tests.patch Patch38: tcsh-6.18.01-skip-tty-tests.patch
# Proposed upstream - http://mx.gw.com/pipermail/tcsh-bugs/2015-May/000944.html
Patch39: tcsh-6.19.00-gcc5-calloc.patch
Provides: csh = %{version} Provides: csh = %{version}
Provides: /bin/tcsh, /bin/csh Provides: /bin/tcsh, /bin/csh
@ -121,6 +123,10 @@ fi
%changelog %changelog
* Thu May 28 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.19.00-02
- Add tcsh-6.19.00-gcc5-calloc.patch to avoid crashes and infinite loops due to
gcc-5 malloc+memset optimization.
* Wed May 27 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.19.00-01 * Wed May 27 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.19.00-01
- Update to tcsh-6.19.00 - Update to tcsh-6.19.00
- Drop tcsh-6.14.00-tinfo.patch, not used anymore - Drop tcsh-6.14.00-tinfo.patch, not used anymore