From 2524ac4722211cfe174982e914b8b5e1315ea0bb Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Thu, 11 May 2017 10:16:18 +0200 Subject: [PATCH] Resolves: #1441092 - compile with -fconserve-stack to prevent stack overflow --- zsh.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/zsh.spec b/zsh.spec index c0d2671..5c803d4 100644 --- a/zsh.spec +++ b/zsh.spec @@ -3,7 +3,7 @@ Summary: Powerful interactive shell Name: zsh Version: 5.3.1 -Release: 4%{?dist} +Release: 5%{?dist} License: MIT URL: http://zsh.sourceforge.net/ Group: System Environment/Shells @@ -68,6 +68,13 @@ This package contains the Zsh manual in html format. cp -p %SOURCE7 . %build +# Compile with -fconserve-stack to prevent stack overflow while executing +# unbounded call recursion in a shell script. Without this compiler flag, +# the default stack allocation limit (8192 KiB) is exceeded before the default +# shell call nesting limit (1000) is reached. See #1441092 for details. +# Minimal example: zsh -c 'foo() { if true; then foo; fi }; foo' +export CFLAGS="$RPM_OPT_FLAGS -fconserve-stack" + # make loading of module's dependencies work again (#1277996) export LIBLDFLAGS='-z lazy' @@ -171,9 +178,13 @@ fi %doc Doc/*.html %changelog +* Thu May 11 2017 Kamil Dudka - 5.3.1-5 +- compile with -fconserve-stack to prevent stack overflow (#1441092) + * Fri Mar 31 2017 Jason L Tibbitts III - 5.3.1-4 - Add build deps on gdbm-devel and pcre-devel. Pass --enable-pcre to configure. These should ensure that the pcre and gdbm modules are built. + (#1438009) * Sat Feb 11 2017 Fedora Release Engineering - 5.3.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild