diff --git a/tcl-dictcrash.patch b/tcl-dictcrash.patch new file mode 100644 index 0000000..a24b812 --- /dev/null +++ b/tcl-dictcrash.patch @@ -0,0 +1,23 @@ +--- generic/tclCompCmds.c ++++ generic/tclCompCmds.c +@@ -1215,7 +1215,7 @@ + tokenPtr = TokenAfter(tokenPtr); + } + if (parsePtr->numWords > 4) { +- TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-2, envPtr); ++ TclEmitInstInt1(INST_CONCAT1, parsePtr->numWords-3, envPtr); + } + + /* +--- tests/dict.test ++++ tests/dict.test +@@ -414,6 +414,9 @@ + catch {unset dictVar} + set result + } {1 {can't set "dictVar": variable is array}} ++test dict-13.10 {compiled dict append: crash case} { ++ apply {{} {dict append dictVar a o k}} ++} {a ok} + + test dict-14.1 {dict for command: syntax} { + list [catch {dict for} msg] $msg diff --git a/tcl.changes b/tcl.changes index 33c6622..1da55d3 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 7 11:44:53 CEST 2008 - max@suse.de + +- Added a fix and a test for a crash in the [dict append] command. + ------------------------------------------------------------------- Mon Apr 7 21:15:17 CEST 2008 - max@suse.de diff --git a/tcl.spec b/tcl.spec index 2e33571..c19f0de 100644 --- a/tcl.spec +++ b/tcl.spec @@ -14,7 +14,7 @@ Name: tcl Url: http://www.tcl.tk Version: 8.5.2 -Release: 4 +Release: 9 %define TCL_MINOR %(echo %version | cut -c1-3) BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: The Tcl Programming Language @@ -29,6 +29,7 @@ Source2: baselibs.conf Source3: macros.tcl Patch0: tcl.patch Patch1: tcl-format.patch +Patch2: tcl-dictcrash.patch %description Tcl (Tool Command Language) is a very powerful but easy to learn @@ -71,6 +72,7 @@ Authors: %setup -q -n %name%version %patch0 %patch1 +%patch2 %build cd unix @@ -146,6 +148,8 @@ exit 0 %_libdir/tclConfig.sh %changelog +* Wed May 07 2008 max@suse.de +- Added a fix and a test for a crash in the [dict append] command. * Mon Apr 07 2008 max@suse.de - Added /etc/rpm/macros.tcl - Fixed behaviour of "%% d" format string.