Compare commits

..

No commits in common. "b72d2b7e379175b85f7f8aba546cd045b27e9285" and "4df0f19e7dcd16879653e5f5f3aebae5a4a131fc" have entirely different histories.

12 changed files with 266 additions and 66 deletions

View File

@ -0,0 +1,35 @@
From 7fff40c678507ffe82b3c65f1a0277a6da0b906e Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Fri, 12 Jan 2018 10:03:58 +0000
Subject: [PATCH 0837/1800] Fix [11ae2be95d]: tip-389 branch: string range
errors with code points greater than U+FFFF
---
generic/tclExecute.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/generic/tclExecute.c b/generic/tclExecute.c
index f2cda0ca8..63281a85e 100644
--- a/generic/tclExecute.c
+++ b/generic/tclExecute.c
@@ -5445,7 +5445,7 @@ TEBCresume(
valuePtr->bytes+index, 1);
} else {
char buf[TCL_UTF_MAX] = "";
- Tcl_UniChar ch = Tcl_GetUniChar(valuePtr, index);
+ int ch = Tcl_GetUniChar(valuePtr, index);
/*
* This could be: Tcl_NewUnicodeObj((const Tcl_UniChar *)&ch, 1)
@@ -5453,7 +5453,7 @@ TEBCresume(
* practical use.
*/
- length = Tcl_UniCharToUtf(ch, buf);
+ length = (ch != -1) ? Tcl_UniCharToUtf(ch, buf) : 0;
objResultPtr = Tcl_NewStringObj(buf, length);
}
--
2.19.1

View File

@ -0,0 +1,88 @@
From a965b9b2624fefd1087fca8505ba3b486772ee70 Mon Sep 17 00:00:00 2001
From: "jan.nijtmans" <nijtmans@users.sourceforge.net>
Date: Mon, 20 Nov 2017 10:15:59 +0000
Subject: [PATCH 0718/1800] Fix error-message for min/math functions: "to" ->
"for", for consistancy with the error-messages for other math functions.
---
library/init.tcl | 4 ++--
tests/expr-old.test | 20 ++++++++++++++++----
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/library/init.tcl b/library/init.tcl
index 87d9f14da..13a4300c3 100644
--- a/library/init.tcl
+++ b/library/init.tcl
@@ -79,7 +79,7 @@ namespace eval tcl {
proc min {args} {
if {![llength $args]} {
return -code error \
- "too few arguments to math function \"min\""
+ "too few arguments for math function \"min\""
}
set val Inf
foreach arg $args {
@@ -95,7 +95,7 @@ namespace eval tcl {
proc max {args} {
if {![llength $args]} {
return -code error \
- "too few arguments to math function \"max\""
+ "too few arguments for math function \"max\""
}
set val -Inf
foreach arg $args {
diff --git a/tests/expr-old.test b/tests/expr-old.test
index 3adfb635f..8c159b2bb 100644
--- a/tests/expr-old.test
+++ b/tests/expr-old.test
@@ -1159,8 +1159,8 @@ test expr-old-40.2 {min math function} -body {
expr {min(0.0)}
} -result 0.0
test expr-old-40.3 {min math function} -body {
- list [catch {expr {min()}} msg] $msg
-} -result {1 {too few arguments to math function "min"}}
+ expr {min()}
+} -returnCodes error -result {too few arguments for math function "min"}
test expr-old-40.4 {min math function} -body {
expr {min(wide(-1) << 30, 4.5, -10)}
} -result [expr {wide(-1) << 30}]
@@ -1170,6 +1170,12 @@ test expr-old-40.5 {min math function} -body {
test expr-old-40.6 {min math function} -body {
expr {min(300, "0xFF")}
} -result 255
+test expr-old-40.7 {min math function} -body {
+ expr min(1[string repeat 0 10000], 1e300)
+} -result 1e+300
+test expr-old-40.8 {min math function} -body {
+ expr {min(0, "a")}
+} -returnCodes error -match glob -result *
test expr-old-41.1 {max math function} -body {
expr {max(0)}
@@ -1178,8 +1184,8 @@ test expr-old-41.2 {max math function} -body {
expr {max(0.0)}
} -result 0.0
test expr-old-41.3 {max math function} -body {
- list [catch {expr {max()}} msg] $msg
-} -result {1 {too few arguments to math function "max"}}
+ expr {max()}
+} -returnCodes error -result {too few arguments for math function "max"}
test expr-old-41.4 {max math function} -body {
expr {max(wide(1) << 30, 4.5, -10)}
} -result [expr {wide(1) << 30}]
@@ -1189,6 +1195,12 @@ test expr-old-41.5 {max math function} -body {
test expr-old-41.6 {max math function} -body {
expr {max(200, "0xFF")}
} -result 255
+test expr-old-41.7 {max math function} -body {
+ expr max(1[string repeat 0 10000], 1e300)
+} -result 1[string repeat 0 10000]
+test expr-old-41.8 {max math function} -body {
+ expr {max(0, "a")}
+} -returnCodes error -match glob -result *
# Special test for Pentium arithmetic bug of 1994:
--
2.19.1

View File

@ -0,0 +1,27 @@
From 5dfa918023df4ec9c5cbd4fe567ee509328f8d4f Mon Sep 17 00:00:00 2001
From: dgp <dgp@users.sourceforge.net>
Date: Mon, 5 Feb 2018 13:33:21 +0000
Subject: [PATCH 0878/1800] Improved overflow prevention.
---
generic/tclStringObj.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index ae75e449e..8437555ed 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -140,8 +140,8 @@ GrowStringBuffer(
objPtr->bytes = NULL;
}
if (flag == 0 || stringPtr->allocated > 0) {
- attempt = 2 * needed;
- if (attempt >= 0) {
+ if (needed <= INT_MAX / 2) {
+ attempt = 2 * needed;
ptr = attemptckrealloc(objPtr->bytes, attempt + 1);
}
if (ptr == NULL) {
--
2.19.1

View File

@ -0,0 +1,27 @@
From 183dadc7fae0994a33901a7246989d2605f5c70c Mon Sep 17 00:00:00 2001
From: dgp <dgp@users.sourceforge.net>
Date: Mon, 5 Feb 2018 13:41:26 +0000
Subject: [PATCH 0879/1800] Improved overflow prevention.
---
generic/tclStringObj.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 8437555ed..c3a0192d8 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -190,8 +190,8 @@ GrowUnicodeBuffer(
* Subsequent appends - apply the growth algorithm.
*/
- attempt = 2 * needed;
- if (attempt >= 0 && attempt <= STRING_MAXCHARS) {
+ if (needed <= STRING_MAXCHARS / 2) {
+ attempt = 2 * needed;
ptr = stringAttemptRealloc(stringPtr, attempt);
}
if (ptr == NULL) {
--
2.19.1

27
fix-exec-test-error.patch Normal file
View File

@ -0,0 +1,27 @@
From 6abda12a6aea301b037341b4c7c6ff1fe84920f9 Mon Sep 17 00:00:00 2001
From: chenzhen <chenzhen44@huawei.com>
Date: Tue, 6 Aug 2019 08:05:04 -0400
Subject: [PATCH] fix exec test error
reason: fix exec test error
Signed-off-by: chenzhen <chenzhen44@huawei.com>
---
tests/exec.test | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/exec.test b/tests/exec.test
index cd29171..c718b2f 100644
--- a/tests/exec.test
+++ b/tests/exec.test
@@ -17,7 +17,6 @@
package require tcltest 2
namespace import -force ::tcltest::*
-package require tcltests
# All tests require the "exec" command.
# Skip them if exec is not defined.
--
2.19.1

View File

@ -9,12 +9,12 @@ Subject: [PATCH 0239/1800] oops
2 files changed, 3 insertions(+), 5 deletions(-) 2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c diff --git a/generic/tclOOMethod.c b/generic/tclOOMethod.c
index c65003f..0c7884a 100644 index 34fa10893..6c9a2eb8d 100644
--- a/generic/tclOOMethod.c --- a/generic/tclOOMethod.c
+++ b/generic/tclOOMethod.c +++ b/generic/tclOOMethod.c
@@ -1548,9 +1548,7 @@ TclOOGetMethodBody( @@ -1540,9 +1540,7 @@ TclOOGetMethodBody(
if (mPtr->typePtr == &procMethodType) { if (mPtr->typePtr == &procMethodType) {
ProcedureMethod *pmPtr = (ProcedureMethod *)mPtr->clientData; ProcedureMethod *pmPtr = mPtr->clientData;
- if (pmPtr->procPtr->bodyPtr->bytes == NULL) { - if (pmPtr->procPtr->bodyPtr->bytes == NULL) {
- (void) Tcl_GetString(pmPtr->procPtr->bodyPtr); - (void) Tcl_GetString(pmPtr->procPtr->bodyPtr);
@ -24,10 +24,10 @@ index c65003f..0c7884a 100644
} }
return NULL; return NULL;
diff --git a/generic/tclTest.c b/generic/tclTest.c diff --git a/generic/tclTest.c b/generic/tclTest.c
index d3eb3b3..ea07291 100644 index 5bfa8f7ca..d96e35641 100644
--- a/generic/tclTest.c --- a/generic/tclTest.c
+++ b/generic/tclTest.c +++ b/generic/tclTest.c
@@ -7253,11 +7253,11 @@ TestconcatobjCmd( @@ -7012,11 +7012,11 @@ TestconcatobjCmd(
list1Ptr = Tcl_NewStringObj("foo bar sum", -1); list1Ptr = Tcl_NewStringObj("foo bar sum", -1);
Tcl_ListObjLength(NULL, list1Ptr, &len); Tcl_ListObjLength(NULL, list1Ptr, &len);
@ -42,5 +42,5 @@ index d3eb3b3..ea07291 100644
/* /*
* Verify that concat'ing a list obj with one or more empty strings does * Verify that concat'ing a list obj with one or more empty strings does
-- --
2.27.0 2.19.1

View File

@ -1,5 +1,5 @@
diff --git a/library/auto.tcl b/library/auto.tcl diff --git a/library/auto.tcl b/library/auto.tcl
index 7d23b6e..3c7717b 100644 index a7a8979..892c2c4 100644
--- a/library/auto.tcl --- a/library/auto.tcl
+++ b/library/auto.tcl +++ b/library/auto.tcl
@@ -81,6 +81,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { @@ -81,6 +81,13 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} {
@ -17,12 +17,12 @@ index 7d23b6e..3c7717b 100644
# Tcl library as well as allowing loading of libraries added to the # Tcl library as well as allowing loading of libraries added to the
# auto_path that is not relative to the core library or binary paths. # auto_path that is not relative to the core library or binary paths.
diff --git a/library/init.tcl b/library/init.tcl diff --git a/library/init.tcl b/library/init.tcl
index edf6bd5..fa37bcc 100644 index 5cda0d9..ffeb301 100644
--- a/library/init.tcl --- a/library/init.tcl
+++ b/library/init.tcl +++ b/library/init.tcl
@@ -52,16 +52,11 @@ if {![info exists auto_path]} { @@ -47,16 +47,11 @@ if {![info exists auto_path]} {
}
namespace eval tcl { namespace eval tcl {
if {![interp issafe]} {
variable Dir variable Dir
- foreach Dir [list $::tcl_library [file dirname $::tcl_library]] { - foreach Dir [list $::tcl_library [file dirname $::tcl_library]] {
+ foreach Dir [list $::tcl_library] { + foreach Dir [list $::tcl_library] {
@ -35,21 +35,21 @@ index edf6bd5..fa37bcc 100644
- if {$Dir ni $::auto_path} { - if {$Dir ni $::auto_path} {
- lappend ::auto_path $Dir - lappend ::auto_path $Dir
- } - }
if {[info exists ::tcl_pkgPath]} { catch { catch {
foreach Dir $::tcl_pkgPath { foreach Dir $::tcl_pkgPath {
if {$Dir ni $::auto_path} { if {$Dir ni $::auto_path} {
diff --git a/unix/configure.in b/unix/configure.in diff --git a/unix/configure.in b/unix/configure.in
index c73f368..5c57692 100644 index 0d3f426..13ce9db 100755
--- a/unix/configure.in --- a/unix/configure.in
+++ b/unix/configure.in +++ b/unix/configure.in
@@ -866,9 +866,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then @@ -866,9 +866,9 @@ if test "$FRAMEWORK_BUILD" = "1" ; then
test -z "$TCL_MODULE_PATH" && \ test -z "$TCL_MODULE_PATH" && \
TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl" TCL_MODULE_PATH="~/Library/Tcl /Library/Tcl"
elif test "$prefix/lib" != "$libdir"; then elif test "$prefix/lib" != "$libdir"; then
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${libdir}} {${prefix}/lib} ${TCL_PACKAGE_PATH}" - test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir} ${prefix}/lib ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}" + test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}"
else else
- test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="{${prefix}/lib} ${TCL_PACKAGE_PATH}" - test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${prefix}/lib ${TCL_PACKAGE_PATH}"
+ test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}" + test -z "$TCL_PACKAGE_PATH" && TCL_PACKAGE_PATH="${libdir}/tcl8.6 ${prefix}/share/tcl8.6 ${libdir}/tk8.6 ${prefix}/share/tk8.6 ${TCL_PACKAGE_PATH}"
fi fi

View File

@ -1,8 +1,8 @@
diff --git a/unix/tcl.m4 b/unix/tcl.m4 diff --git a/unix/tcl.m4 b/unix/tcl.m4
index f3d08ec..ed12cda 100644 index 0e146e4..180fff1 100644
--- a/unix/tcl.m4 --- a/unix/tcl.m4
+++ b/unix/tcl.m4 +++ b/unix/tcl.m4
@@ -1382,7 +1382,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ @@ -1410,12 +1410,12 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
# get rid of the warnings. # get rid of the warnings.
#CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
@ -11,11 +11,8 @@ index f3d08ec..ed12cda 100644
DL_OBJS="tclLoadDl.o" DL_OBJS="tclLoadDl.o"
DL_LIBS="-ldl" DL_LIBS="-ldl"
LDFLAGS="$LDFLAGS -Wl,--export-dynamic" LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
@@ -1398,7 +1398,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
esac
AS_IF([test $doRpath = yes], [ AS_IF([test $doRpath = yes], [
- CC_SEARCH_FLAGS='"-Wl,-rpath,${LIB_RUNTIME_DIR}"']) - CC_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'])
+ CC_SEARCH_FLAGS='']) + CC_SEARCH_FLAGS=''])
LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS} LD_SEARCH_FLAGS=${CC_SEARCH_FLAGS}
AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"]) AS_IF([test "`uname -m`" = "alpha"], [CFLAGS="$CFLAGS -mieee"])

View File

@ -1,3 +1,25 @@
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 39fb740..bbe342b 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3277,7 +3277,7 @@ MODULE_SCOPE void TclClockInit(Tcl_Interp *interp);
MODULE_SCOPE int TclClockOldscanObjCmd(
ClientData clientData, Tcl_Interp *interp,
int objc, Tcl_Obj *const objv[]);
-MODULE_SCOPE int Tcl_CloseObjCmd(ClientData clientData,
+extern int Tcl_CloseObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int Tcl_ConcatObjCmd(ClientData clientData,
@@ -3458,7 +3458,7 @@ MODULE_SCOPE int Tcl_RenameObjCmd(ClientData clientData,
MODULE_SCOPE int Tcl_RepresentationCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
-MODULE_SCOPE int Tcl_ReturnObjCmd(ClientData clientData,
+extern int Tcl_ReturnObjCmd(ClientData clientData,
Tcl_Interp *interp, int objc,
Tcl_Obj *const objv[]);
MODULE_SCOPE int Tcl_ScanObjCmd(ClientData clientData,
diff --git a/generic/tclPort.h b/generic/tclPort.h diff --git a/generic/tclPort.h b/generic/tclPort.h
index 9485567..f329cde 100644 index 9485567..f329cde 100644
--- a/generic/tclPort.h --- a/generic/tclPort.h

BIN
tcl-core8.6.10-src.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,8 +1,8 @@
%define MAJOR 8.6 %define MAJOR 8.6
Name: tcl Name: tcl
Version: 8.6.14 Version: 8.6.10
Release: 1 Release: 3
Epoch: 1 Epoch: 1
Summary: The Tool Command Language implementation Summary: The Tool Command Language implementation
License: BSD License: BSD
@ -14,13 +14,18 @@ Provides: tcl(abi) = %{MAJOR}
Obsoletes: tcl-tcldict <= %{version} Obsoletes: tcl-tcldict <= %{version}
Provides: tcl-tcldict = %{version} Provides: tcl-tcldict = %{version}
Patch0: tcl-8.6.12-autopath.patch Patch0: tcl-8.6.10-autopath.patch
Patch1: tcl-8.6.12-conf.patch Patch1: tcl-8.6.10-conf.patch
Patch2: tcl-8.6.10-hidden.patch Patch2: tcl-8.6.10-hidden.patch
Patch3: tcl-8.6.10-tcltests-path-fix.patch Patch3: tcl-8.6.10-tcltests-path-fix.patch
Patch4: stay-out-of-internals-when-nice-interfaces-are-avail.patch Patch4: stay-out-of-internals-when-nice-interfaces-are-avail.patch
Patch5: oops.patch Patch5: oops.patch
Patch6: File-not-found-should-be-ignored-silently.patch Patch6: Fix-error-message-for-min-math-functions-to-for-for-.patch
Patch7: Fix-11ae2be95d-tip-389-branch-string-range-errors-wi.patch
Patch8: Improved-overflow-prevention-1.patch
Patch9: Improved-overflow-prevention-2.patch
Patch10: fix-exec-test-error.patch
Patch11: File-not-found-should-be-ignored-silently.patch
%description %description
Tcl(Tool Command Language) provides a powerful platform for creating integration applications Tcl(Tool Command Language) provides a powerful platform for creating integration applications
@ -53,11 +58,7 @@ The development files for tcl.
cd unix cd unix
autoconf autoconf
%configure --enable-threads --enable-symbols --enable-shared --enable-dtrace %configure --enable-threads --enable-symbols --enable-shared --enable-dtrace
%ifnarch loongarch64
%make_build CFLAGS="%{optflags}" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR} %make_build CFLAGS="%{optflags}" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR}
%else
%make_build CFLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive" TCL_LIBRARY=%{_datadir}/%{name}%{MAJOR}
%endif
%install %install
cd unix cd unix
@ -126,30 +127,6 @@ make test
%{_mandir}/mann/* %{_mandir}/mann/*
%changelog %changelog
* Thu Feb 29 2024 wangqia <wangqia@uniontech.com> - 1:8.6.13-1
- Update to version 8.6.14
* Wed Feb 08 2023 fuanan <fuanan3@h-partners.com> - 1:8.6.13-2
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:drop the old symbol
* Sun Jan 29 2023 zhangruifang2020 <zhangruifang1@h-partners.com> - 1:8.6.13-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 8.6.13
* Tue Nov 15 2022 huajingyun <huajingyun@loongson.cn> - 1:8.6.12-2
- add build flags for weak symbols on loongarch64
* Thu Apr 21 2022 zoulin <zoulin13@h-partners.com> - 1:8.6.12-1
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:update to 8.6.12
* Fri May 28 2021 yangzhuangzhuang <yangzhuangzhaung1@huawei.com> - 1:8.6.10-3 * Fri May 28 2021 yangzhuangzhuang <yangzhuangzhaung1@huawei.com> - 1:8.6.10-3
- Type:bugfix - Type:bugfix
- ID:NA - ID:NA