Add patch to fix segfault from Tcl RexExp handling (bug 834580)
This commit is contained in:
parent
c8011ae80f
commit
2ccfc854ef
34
environment-modules-regex.patch
Normal file
34
environment-modules-regex.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
diff -ur modules-3.2.9.orig/cmdXResource.c modules-3.2.9/cmdXResource.c
|
||||||
|
--- modules-3.2.9.orig/cmdXResource.c 2010-11-11 19:23:18.000000000 +0100
|
||||||
|
+++ modules-3.2.9/cmdXResource.c 2012-08-24 13:49:48.717499074 +0200
|
||||||
|
@@ -446,7 +446,6 @@
|
||||||
|
** is a constant regexp!
|
||||||
|
**/
|
||||||
|
|
||||||
|
- if( !res_exp)
|
||||||
|
res_exp = Tcl_RegExpCompile(interp,
|
||||||
|
"^[ \t]*([^ \t]*)[ \t]*:[ \t]*(.*)[ \t]*$");
|
||||||
|
|
||||||
|
diff -ur modules-3.2.9.orig/utility.c modules-3.2.9/utility.c
|
||||||
|
--- modules-3.2.9.orig/utility.c 2011-11-28 22:27:13.000000000 +0100
|
||||||
|
+++ modules-3.2.9/utility.c 2012-08-24 13:50:13.455735765 +0200
|
||||||
|
@@ -3061,16 +3061,13 @@
|
||||||
|
tstr = (const char *) TCL_RESULT(interp);
|
||||||
|
|
||||||
|
/* compile regular expression the first time through */
|
||||||
|
- if (!exit__expPtr)
|
||||||
|
- exit__expPtr = Tcl_RegExpCompile(interp, "^EXIT ([0-9]*)");
|
||||||
|
+ exit__expPtr = Tcl_RegExpCompile(interp, "^EXIT ([0-9]*)");
|
||||||
|
|
||||||
|
/* result = "invoked \"break\" outside of a loop" */
|
||||||
|
- if (!break_expPtr)
|
||||||
|
- break_expPtr = Tcl_RegExpCompile(interp, ".*\"break\".*");
|
||||||
|
+ break_expPtr = Tcl_RegExpCompile(interp, ".*\"break\".*");
|
||||||
|
|
||||||
|
/* result = "invoked \"continue\" outside of a loop" */
|
||||||
|
- if (!continue_expPtr)
|
||||||
|
- continue_expPtr = Tcl_RegExpCompile(interp, ".*\"continue\".*");
|
||||||
|
+ continue_expPtr = Tcl_RegExpCompile(interp, ".*\"continue\".*");
|
||||||
|
|
||||||
|
/* intercept any "EXIT N" first */
|
||||||
|
if(tstr && *tstr && 0 < Tcl_RegExpExec(interp, exit__expPtr,
|
@ -1,6 +1,6 @@
|
|||||||
Name: environment-modules
|
Name: environment-modules
|
||||||
Version: 3.2.9c
|
Version: 3.2.9c
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Summary: Provides dynamic modification of a user's environment
|
Summary: Provides dynamic modification of a user's environment
|
||||||
|
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
@ -10,6 +10,9 @@ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.
|
|||||||
Source1: modules.sh
|
Source1: modules.sh
|
||||||
Source2: createmodule.sh
|
Source2: createmodule.sh
|
||||||
Patch0: environment-modules-3.2.7-bindir.patch
|
Patch0: environment-modules-3.2.7-bindir.patch
|
||||||
|
# Patch to fix segfault in module unload due to Tcl RegExp handling
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=834580
|
||||||
|
Patch1: environment-modules-regex.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: tcl-devel, tclx-devel, libX11-devel
|
BuildRequires: tcl-devel, tclx-devel, libX11-devel
|
||||||
@ -46,6 +49,7 @@ have access to the module alias.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n modules-3.2.9
|
%setup -q -n modules-3.2.9
|
||||||
%patch0 -p1 -b .bindir
|
%patch0 -p1 -b .bindir
|
||||||
|
%patch1 -p1 -b .regex
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -93,6 +97,9 @@ make test
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 24 2012 Orion Poplawski <orion@cora.nwra.com> - 3.2.9c-4
|
||||||
|
- Add patch to fix segfault from Tcl RexExp handling (bug 834580)
|
||||||
|
|
||||||
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.9c-3
|
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.9c-3
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user