From ff2d753e7bc78407e0814b750d5ae3f45d5e4211fde19c6ecbe2f1b0065e35e3 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Fri, 29 Dec 2017 20:37:36 +0000 Subject: [PATCH 1/5] - Version 8.6.8: * [array names -regexp] supports backrefs * Fix gcc build failures due to #pragma placement * (bug)[b50fb2] exec redir append stdout and stderr to file * (bug)[2a9465] http state 100 continue handling broken * (bug)[0e4d88] replace command, delete trace kills namespace * (bug)[1a5655] [info * methods] includes mixins * (bug)[fc1409] segfault in method cloning, oo-15.15 * (bug)[3298012] Stop crash when hash tables overflow 32 bits * (bug)[5d6de6] Close failing case of [package prefer stable] * (bug)[4f6a1e] Crash when ensemble map and list are same * (bug)[ce3a21] file normalize failure when tail is empty * (new)[TIP 477] nmake build system reform * (bug)[586e71] EvalObjv exception handling at level #0 - Sync SLE12 with Factory to fix a bug in Itcl that was affecting iwidgets (bsc#903017). - Remove obsolete patches tcl-unload.patch and tcl.patch. OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=110 --- tcl.changes | 25 +++++++++++++++++++++++++ tcl.spec | 12 ++++++------ tcl8.6.7-src.tar.gz | 3 --- tcl8.6.8-src.tar.gz | 3 +++ 4 files changed, 34 insertions(+), 9 deletions(-) delete mode 100644 tcl8.6.7-src.tar.gz create mode 100644 tcl8.6.8-src.tar.gz diff --git a/tcl.changes b/tcl.changes index 4d9c95f..561e394 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,21 @@ +------------------------------------------------------------------- +Fri Dec 29 20:11:51 UTC 2017 - max@suse.com + +- Version 8.6.8: + * [array names -regexp] supports backrefs + * Fix gcc build failures due to #pragma placement + * (bug)[b50fb2] exec redir append stdout and stderr to file + * (bug)[2a9465] http state 100 continue handling broken + * (bug)[0e4d88] replace command, delete trace kills namespace + * (bug)[1a5655] [info * methods] includes mixins + * (bug)[fc1409] segfault in method cloning, oo-15.15 + * (bug)[3298012] Stop crash when hash tables overflow 32 bits + * (bug)[5d6de6] Close failing case of [package prefer stable] + * (bug)[4f6a1e] Crash when ensemble map and list are same + * (bug)[ce3a21] file normalize failure when tail is empty + * (new)[TIP 477] nmake build system reform + * (bug)[586e71] EvalObjv exception handling at level #0 + ------------------------------------------------------------------- Thu Dec 14 12:55:02 CET 2017 - mls@suse.de @@ -10,6 +28,12 @@ Thu Dec 14 05:58:11 UTC 2017 - normand@linux.vnet.ibm.com identified following tests failed on PowerPC interp-34.9 interp-34.13 http-3.25 timer-2.1 thread-20.9 +------------------------------------------------------------------- +Thu Oct 19 14:37:39 UTC 2017 - max@suse.com + +- Sync SLE12 with Factory to fix a bug in Itcl that was affecting + iwidgets (bsc#903017). + ------------------------------------------------------------------- Mon Sep 25 16:05:41 UTC 2017 - max@suse.com @@ -218,6 +242,7 @@ Sat Sep 6 10:23:13 UTC 2014 - coolo@suse.de Mon Sep 1 07:45:22 UTC 2014 - fcrozat@suse.com - Update license tag to SPDX 1.2. +- Remove obsolete patches tcl-unload.patch and tcl.patch. ------------------------------------------------------------------- Thu Aug 28 14:24:16 UTC 2014 - vwallfahrer@suse.com diff --git a/tcl.spec b/tcl.spec index 428c04e..cb9ef3d 100644 --- a/tcl.spec +++ b/tcl.spec @@ -18,18 +18,19 @@ Name: tcl Url: http://www.tcl.tk -Version: 8.6.7 +Version: 8.6.8 Release: 0 %define rrc %{nil} %define TCL_MINOR %(echo %version | cut -c1-3) +%define itclver 4.1.1 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: The Tcl Programming Language License: TCL Group: Development/Languages/Tcl -Provides: itcl = 4.0.5 +Provides: itcl = %itclver Provides: tclsh Provides: tclsh%{TCL_MINOR} -Obsoletes: itcl < 4.0.5 +Obsoletes: itcl < %itclver # bug437293 %ifarch ppc64 Obsoletes: tcl-64bit @@ -65,8 +66,8 @@ Requires: tcl = %version %ifarch ppc64 Obsoletes: tcl-devel-64bit %endif -Obsoletes: itcl-devel < 4.0.2 -Provides: itcl-devel = 4.0.2 +Obsoletes: itcl-devel < %itclver +Provides: itcl-devel = %itclver # %description devel @@ -137,7 +138,6 @@ EOF make test 2>&1 | tee testresults grep FAILED testresults | grep -Fvwf known-failures && exit 1 %endif -exit 0 %install make -C unix install install-private-headers \ diff --git a/tcl8.6.7-src.tar.gz b/tcl8.6.7-src.tar.gz deleted file mode 100644 index a7a8fd9..0000000 --- a/tcl8.6.7-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7c6b8f84e37332423cfe5bae503440d88450da8cc1243496249faa5268026ba5 -size 9687799 diff --git a/tcl8.6.8-src.tar.gz b/tcl8.6.8-src.tar.gz new file mode 100644 index 0000000..bafac38 --- /dev/null +++ b/tcl8.6.8-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a +size 9793786 From 3375fd691e4fde671c3b886628f3adca931f317a821c411d0aad33e64faac6cd Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 15 Mar 2018 15:04:33 +0000 Subject: [PATCH 2/5] Accepting request 587529 from home:oertel:branches:devel:languages:tcl - handle s390 like s390x (bnc#1085480) OBS-URL: https://build.opensuse.org/request/show/587529 OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=111 --- tcl.changes | 5 +++++ tcl.spec | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tcl.changes b/tcl.changes index 561e394..c3fe322 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Mar 15 14:54:52 CET 2018 - ro@suse.de + +- handle s390 like s390x (bnc#1085480) + ------------------------------------------------------------------- Fri Dec 29 20:11:51 UTC 2017 - max@suse.com diff --git a/tcl.spec b/tcl.spec index cb9ef3d..9db5501 100644 --- a/tcl.spec +++ b/tcl.spec @@ -1,7 +1,7 @@ # # spec file for package tcl # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -134,7 +134,7 @@ thread-7.31 thread-20.9 thread-21.16 EOF -%ifnarch s390x +%ifnarch s390 s390x make test 2>&1 | tee testresults grep FAILED testresults | grep -Fvwf known-failures && exit 1 %endif From 553958db8187452fa7314c9e9afc56f6a762e696b5c459ce930130f50e38cc55 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Wed, 12 Dec 2018 16:56:51 +0000 Subject: [PATCH 3/5] - New version: 8.6.9: * NR-enable [package require] * (bug)[9fd5c6] crash in object deletion, test oo-11.5 * (bug)[3c32a3] crash deleting object with class mixed in * (platform) stop using -lieee, removed from glibc-2.27 * (bug)[8e6a9a] bad binary [string match], test string-11.55 * (bug)[1873ea] repair multi-thread std channel init * (bug)[db36fa] broken bytecode for index values * (bug) broken compiled [string replace], test string-14.19 * (bug) [string trim*] engine crashed on invalid UTF * (bug) missing trace in compiled [array set], test var-20.11 * (bug)[46a241] crash in unset array with search, var-13.[23] * (bug)[27b682] race made [file delete] raise "no such file" * (bug)[925643] 32/64 cleanup of filesystem DIR operations * (bug) leaks in TclSetEnv and env cache * (bug)[3592747] [yieldto] dying namespace, tailcall-14.1 * (bug)[270f78] race in [file mkdir] * (bug)[3f7af0] [file delete] raised "permission denied" * (bug)[d051b7] overflow crash in [format] * revised quoting of [exec] args in generated command line * HTTP Keep-Alive with pipelined requests * (new)[TIP 505] [lreplace] accepts all out of range indices * (bug) Prevent crash from NULL keyName in the registry package * Update tcltest package for Travis support * (bug)[35a8f1] overlong string length of some lists * (bug)[00d04c] Repair [binary encode base64] OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=112 --- tcl.changes | 30 ++++++++++++++++++++++++++++++ tcl.spec | 7 ++++--- tcl8.6.8-src.tar.gz | 3 --- tcl8.6.9-src.tar.gz | 3 +++ 4 files changed, 37 insertions(+), 6 deletions(-) delete mode 100644 tcl8.6.8-src.tar.gz create mode 100644 tcl8.6.9-src.tar.gz diff --git a/tcl.changes b/tcl.changes index c3fe322..a2f07b4 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Wed Dec 12 16:28:09 UTC 2018 - Reinhard Max + +- New version: 8.6.9: + * NR-enable [package require] + * (bug)[9fd5c6] crash in object deletion, test oo-11.5 + * (bug)[3c32a3] crash deleting object with class mixed in + * (platform) stop using -lieee, removed from glibc-2.27 + * (bug)[8e6a9a] bad binary [string match], test string-11.55 + * (bug)[1873ea] repair multi-thread std channel init + * (bug)[db36fa] broken bytecode for index values + * (bug) broken compiled [string replace], test string-14.19 + * (bug) [string trim*] engine crashed on invalid UTF + * (bug) missing trace in compiled [array set], test var-20.11 + * (bug)[46a241] crash in unset array with search, var-13.[23] + * (bug)[27b682] race made [file delete] raise "no such file" + * (bug)[925643] 32/64 cleanup of filesystem DIR operations + * (bug) leaks in TclSetEnv and env cache + * (bug)[3592747] [yieldto] dying namespace, tailcall-14.1 + * (bug)[270f78] race in [file mkdir] + * (bug)[3f7af0] [file delete] raised "permission denied" + * (bug)[d051b7] overflow crash in [format] + * revised quoting of [exec] args in generated command line + * HTTP Keep-Alive with pipelined requests + * (new)[TIP 505] [lreplace] accepts all out of range indices + * (bug) Prevent crash from NULL keyName in the registry package + * Update tcltest package for Travis support + * (bug)[35a8f1] overlong string length of some lists + * (bug)[00d04c] Repair [binary encode base64] + ------------------------------------------------------------------- Thu Mar 15 14:54:52 CET 2018 - ro@suse.de diff --git a/tcl.spec b/tcl.spec index 9db5501..1fa3403 100644 --- a/tcl.spec +++ b/tcl.spec @@ -12,17 +12,17 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # Name: tcl Url: http://www.tcl.tk -Version: 8.6.8 +Version: 8.6.9 Release: 0 %define rrc %{nil} %define TCL_MINOR %(echo %version | cut -c1-3) -%define itclver 4.1.1 +%define itclver 4.1.2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: The Tcl Programming Language License: TCL @@ -138,6 +138,7 @@ EOF make test 2>&1 | tee testresults grep FAILED testresults | grep -Fvwf known-failures && exit 1 %endif +exit 0 %install make -C unix install install-private-headers \ diff --git a/tcl8.6.8-src.tar.gz b/tcl8.6.8-src.tar.gz deleted file mode 100644 index bafac38..0000000 --- a/tcl8.6.8-src.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c43cb0c1518ce42b00e7c8f6eaddd5195c53a98f94adc717234a65cbcfd3f96a -size 9793786 diff --git a/tcl8.6.9-src.tar.gz b/tcl8.6.9-src.tar.gz new file mode 100644 index 0000000..c1036c6 --- /dev/null +++ b/tcl8.6.9-src.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ad0cd2de2c87b9ba8086b43957a0de3eb2eb565c7159d5f53ccbba3feb915f4e +size 10000896 From b850dbfa83b00f784712983feeab4601f6d30fdd3d2da48fa4b043079dcdd2f2 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Tue, 8 Jan 2019 15:43:13 +0000 Subject: [PATCH 4/5] - Fix a regression in the handling of denormalized empty lists (tcl-expand-regression.patch, tcl#cc1e91552c). OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=113 --- tcl-expand-regression.patch | 76 +++++++++++++++++++++++++++++++++++++ tcl.changes | 6 +++ tcl.spec | 4 +- 3 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 tcl-expand-regression.patch diff --git a/tcl-expand-regression.patch b/tcl-expand-regression.patch new file mode 100644 index 0000000..09791d5 --- /dev/null +++ b/tcl-expand-regression.patch @@ -0,0 +1,76 @@ +Index: generic/tclExecute.c +================================================================== +--- generic/tclExecute.c ++++ generic/tclExecute.c +@@ -5235,12 +5235,16 @@ + } + #endif + + /* Every range of an empty list is an empty list */ + if (objc == 0) { +- TRACE_APPEND(("\n")); +- NEXT_INST_F(9, 0, 0); ++ /* avoid return of not canonical list (e. g. spaces in string repr.) */ ++ if (ListObjIsCanonical(valuePtr)) { ++ TRACE_APPEND(("\n")); ++ NEXT_INST_F(9, 0, 0); ++ } ++ goto emptyList; + } + + /* Decode index value operands. */ + + /* + +Index: tests/basic.test +================================================================== +--- tests/basic.test ++++ tests/basic.test +@@ -959,10 +959,16 @@ + lappend res [catch { run { {*}{error Hejsan} } } err] + lappend res $err + } -cleanup { + unset res t + } -result {0 10 1 Hejsan} ++ ++test basic-48.24.$noComp {expansion: empty not canonical list, regression test, bug [cc1e91552c]} -constraints $constraints -setup { ++ unset -nocomplain a ++} -body { ++ run {list [list {*}{ }] [list {*}[format %c 32]] [list {*}[set a { }]]} ++} -result [lrepeat 3 {}] -cleanup {unset -nocomplain a} + + } ;# End of noComp loop + + test basic-49.1 {Tcl_EvalEx: verify TCL_EVAL_GLOBAL operation} testevalex { + set ::x global + +Index: tests/lrange.test +================================================================== +--- tests/lrange.test ++++ tests/lrange.test +@@ -105,14 +105,24 @@ + list [lrange {a b c} -1 1] [lrange {a b c} -1+0 end-1] [lrange {a b c} -2 1] [lrange {a b c} -2+0 0+1] + } [lrepeat 4 {a b}] + test lrange-3.6 {compiled with calculated indices, end out of range (after end)} { + list [lrange {a b c} 1 end+1] [lrange {a b c} 1+0 2+1] [lrange {a b c} 1 end+1] [lrange {a b c} end-1 3+1] + } [lrepeat 4 {b c}] ++ ++test lrange-3.7a {compiled on empty not canonical list (with static and dynamic indices), regression test, bug [cc1e91552c]} { ++ list [lrange { } 0 1] [lrange [format %c 32] 0 1] [lrange [set a { }] 0 1] \ ++ [lrange { } 0-1 end+1] [lrange [format %c 32] 0-1 end+1] [lrange $a 0-1 end+1] ++} [lrepeat 6 {}] ++test lrange-3.7b {not compiled on empty not canonical list (with static and dynamic indices), regression test, bug [cc1e91552c]} { ++ set cmd lrange ++ list [$cmd { } 0 1] [$cmd [format %c 32] 0 1] [$cmd [set a { }] 0 1] \ ++ [$cmd { } 0-1 end+1] [$cmd [format %c 32] 0-1 end+1] [$cmd $a 0-1 end+1] ++} [lrepeat 6 {}] + + + # cleanup + ::tcltest::cleanupTests + return + + # Local Variables: + # mode: tcl + # End: + diff --git a/tcl.changes b/tcl.changes index a2f07b4..f3c22ca 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 8 15:39:33 UTC 2019 - Reinhard Max + +- Fix a regression in the handling of denormalized empty lists + (tcl-expand-regression.patch, tcl#cc1e91552c). + ------------------------------------------------------------------- Wed Dec 12 16:28:09 UTC 2018 - Reinhard Max diff --git a/tcl.spec b/tcl.spec index 1fa3403..5d91c3f 100644 --- a/tcl.spec +++ b/tcl.spec @@ -1,7 +1,7 @@ # # spec file for package tcl # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -41,6 +41,7 @@ Source0: ftp://ftp.tcl.tk/pub/tcl/tcl8_6/%{name}%{version}%{rrc}-src.tar. Source1: tcl-rpmlintrc Source2: baselibs.conf Source3: macros.tcl +Patch0: tcl-expand-regression.patch BuildRequires: autoconf BuildRequires: pkg-config BuildRequires: zlib-devel @@ -80,6 +81,7 @@ the Tcl language itself. %prep %setup -q -n %name%version +%patch0 %build cd unix From 2ffdc34f060066397dea6b1c3318727e8bf2c930783023ba4a726d9823015b47 Mon Sep 17 00:00:00 2001 From: Reinhard Max Date: Thu, 17 Jan 2019 13:24:26 +0000 Subject: [PATCH 5/5] OBS-URL: https://build.opensuse.org/package/show/devel:languages:tcl/tcl?expand=0&rev=114 --- tcl-expand-regression.patch | 147 +++++++++++++++++++++++++++++++++++- tcl.changes | 2 +- 2 files changed, 146 insertions(+), 3 deletions(-) diff --git a/tcl-expand-regression.patch b/tcl-expand-regression.patch index 09791d5..43d79af 100644 --- a/tcl-expand-regression.patch +++ b/tcl-expand-regression.patch @@ -11,7 +11,7 @@ Index: generic/tclExecute.c - TRACE_APPEND(("\n")); - NEXT_INST_F(9, 0, 0); + /* avoid return of not canonical list (e. g. spaces in string repr.) */ -+ if (ListObjIsCanonical(valuePtr)) { ++ if (!valuePtr->bytes || !valuePtr->bytes[0]) { + TRACE_APPEND(("\n")); + NEXT_INST_F(9, 0, 0); + } @@ -22,6 +22,112 @@ Index: generic/tclExecute.c /* +Index: generic/tclTest.c +================================================================== +--- generic/tclTest.c ++++ generic/tclTest.c +@@ -218,10 +218,13 @@ + static void PrintParse(Tcl_Interp *interp, Tcl_Parse *parsePtr); + static void SpecialFree(char *blockPtr); + static int StaticInitProc(Tcl_Interp *interp); + static int TestasyncCmd(ClientData dummy, + Tcl_Interp *interp, int argc, const char **argv); ++static int TestpurebytesobjObjCmd(ClientData clientData, ++ Tcl_Interp *interp, int objc, ++ Tcl_Obj *const objv[]); + static int TestbytestringObjCmd(ClientData clientData, + Tcl_Interp *interp, int objc, + Tcl_Obj *const objv[]); + static int TestcmdinfoCmd(ClientData dummy, + Tcl_Interp *interp, int argc, const char **argv); +@@ -568,10 +571,11 @@ + */ + + Tcl_CreateObjCommand(interp, "gettimes", GetTimesObjCmd, NULL, NULL); + Tcl_CreateCommand(interp, "noop", NoopCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "noop", NoopObjCmd, NULL, NULL); ++ Tcl_CreateObjCommand(interp, "testpurebytesobj", TestpurebytesobjObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testbytestring", TestbytestringObjCmd, NULL, NULL); + Tcl_CreateObjCommand(interp, "testwrongnumargs", TestWrongNumArgsObjCmd, + NULL, NULL); + Tcl_CreateObjCommand(interp, "testfilesystem", TestFilesystemObjCmd, + NULL, NULL); +@@ -2079,11 +2083,11 @@ + int length, flags; + const char *script; + + flags = 0; + if (objc == 3) { +- const char *global = Tcl_GetStringFromObj(objv[2], &length); ++ const char *global = Tcl_GetString(objv[2]); + if (strcmp(global, "global") != 0) { + Tcl_AppendResult(interp, "bad value \"", global, + "\": must be global", NULL); + return TCL_ERROR; + } +@@ -4953,10 +4957,61 @@ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* The argument objects. */ + { + return TCL_OK; + } ++ ++/* ++ *---------------------------------------------------------------------- ++ * ++ * TestpurebytesobjObjCmd -- ++ * ++ * This object-based procedure constructs a pure bytes object ++ * without type and with internal representation containing NULL's. ++ * ++ * If no argument supplied it returns empty object with tclEmptyStringRep, ++ * otherwise it returns this as pure bytes object with bytes value equal ++ * string. ++ * ++ * Results: ++ * Returns the TCL_OK result code. ++ * ++ * Side effects: ++ * None. ++ * ++ *---------------------------------------------------------------------- ++ */ ++ ++static int ++TestpurebytesobjObjCmd( ++ ClientData unused, /* Not used. */ ++ Tcl_Interp *interp, /* Current interpreter. */ ++ int objc, /* Number of arguments. */ ++ Tcl_Obj *const objv[]) /* The argument objects. */ ++{ ++ Tcl_Obj *objPtr; ++ ++ if (objc > 2) { ++ Tcl_WrongNumArgs(interp, 1, objv, "?string?"); ++ return TCL_ERROR; ++ } ++ objPtr = Tcl_NewObj(); ++ /* ++ objPtr->internalRep.twoPtrValue.ptr1 = NULL; ++ objPtr->internalRep.twoPtrValue.ptr2 = NULL; ++ */ ++ memset(&objPtr->internalRep, 0, sizeof(objPtr->internalRep)); ++ if (objc == 2) { ++ const char *s = Tcl_GetString(objv[1]); ++ objPtr->length = objv[1]->length; ++ objPtr->bytes = ckalloc(objPtr->length + 1); ++ memcpy(objPtr->bytes, s, objPtr->length); ++ objPtr->bytes[objPtr->length] = 0; ++ } ++ Tcl_SetObjResult(interp, objPtr); ++ return TCL_OK; ++} + + /* + *---------------------------------------------------------------------- + * + * TestbytestringObjCmd -- + Index: tests/basic.test ================================================================== --- tests/basic.test @@ -48,7 +154,24 @@ Index: tests/lrange.test ================================================================== --- tests/lrange.test +++ tests/lrange.test -@@ -105,14 +105,24 @@ +@@ -13,10 +13,16 @@ + + if {[lsearch [namespace children] ::tcltest] == -1} { + package require tcltest + namespace import -force ::tcltest::* + } ++ ++::tcltest::loadTestedCommands ++catch [list package require -exact Tcltest [info patchlevel]] ++ ++testConstraint testpurebytesobj [llength [info commands testpurebytesobj]] ++ + + test lrange-1.1 {range of list elements} { + lrange {a b c d} 1 2 + } {b c} + test lrange-1.2 {range of list elements} { +@@ -105,14 +111,44 @@ list [lrange {a b c} -1 1] [lrange {a b c} -1+0 end-1] [lrange {a b c} -2 1] [lrange {a b c} -2+0 0+1] } [lrepeat 4 {a b}] test lrange-3.6 {compiled with calculated indices, end out of range (after end)} { @@ -63,6 +186,26 @@ Index: tests/lrange.test + set cmd lrange + list [$cmd { } 0 1] [$cmd [format %c 32] 0 1] [$cmd [set a { }] 0 1] \ + [$cmd { } 0-1 end+1] [$cmd [format %c 32] 0-1 end+1] [$cmd $a 0-1 end+1] ++} [lrepeat 6 {}] ++# following 4 tests could cause a segfault on empty non-lists with tclEmptyStringRep ++# (as before the fix [58c46e74b931d3a1]): ++test lrange-3.7a.2 {compiled on empty not list object, 2nd regression test, bug [cc1e91552c]} { ++ list [lrange {} 0 1] [lrange [lindex a -1] 0 1] [lrange [set a {}] 0 1] \ ++ [lrange {} 0-1 end+1] [lrange [lindex a -1] 0-1 end+1] [lrange $a 0-1 end+1] ++} [lrepeat 6 {}] ++test lrange-3.7b.2 {not compiled on empty not list object, 2nd regression test, bug [cc1e91552c]} { ++ set cmd lrange ++ list [$cmd {} 0 1] [$cmd [lindex a -1] 0 1] [$cmd [set a {}] 0 1] \ ++ [$cmd {} 0-1 end+1] [$cmd [lindex a -1] 0-1 end+1] [$cmd $a 0-1 end+1] ++} [lrepeat 6 {}] ++test lrange-3.7c.2 {compiled on empty pure bytes object, 2nd regression test, bug [cc1e91552c]} { ++ list [lrange [testpurebytesobj] 0 1] [lrange [testpurebytesobj { }] 0 1] [lrange [set a [testpurebytesobj {}]] 0 1] \ ++ [lrange [testpurebytesobj] 0-1 end+1] [lrange [testpurebytesobj { }] 0-1 end+1] [lrange $a 0-1 end+1] ++} [lrepeat 6 {}] ++test lrange-3.7d.2 {not compiled on empty pure bytes object, 2nd regression test, bug [cc1e91552c]} { ++ set cmd lrange ++ list [$cmd [testpurebytesobj] 0 1] [$cmd [testpurebytesobj { }] 0 1] [$cmd [set a [testpurebytesobj {}]] 0 1] \ ++ [$cmd [testpurebytesobj] 0-1 end+1] [$cmd [testpurebytesobj { }] 0-1 end+1] [$cmd $a 0-1 end+1] +} [lrepeat 6 {}] diff --git a/tcl.changes b/tcl.changes index f3c22ca..0732fdf 100644 --- a/tcl.changes +++ b/tcl.changes @@ -1,5 +1,5 @@ ------------------------------------------------------------------- -Tue Jan 8 15:39:33 UTC 2019 - Reinhard Max +Thu Jan 17 09:22:56 UTC 2019 - Reinhard Max - Fix a regression in the handling of denormalized empty lists (tcl-expand-regression.patch, tcl#cc1e91552c).