summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2011-06-29 21:34:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2011-06-29 21:34:11 (GMT)
commit4fe1846f2ab9eb6dd9c8fb30c91b1e2fa747a4cd (patch)
tree9a60767652409c11c2188e1f7bb9ad7f8a800fae
parente37e625b577e94286bbff5fdbfb3b2d29edd6cf9 (diff)
downloadtk-4fe1846f2ab9eb6dd9c8fb30c91b1e2fa747a4cd.zip
tk-4fe1846f2ab9eb6dd9c8fb30c91b1e2fa747a4cd.tar.gz
tk-4fe1846f2ab9eb6dd9c8fb30c91b1e2fa747a4cd.tar.bz2
3341056 Correct segfault due to flaw in the 2011-06-17 commit.
-rw-r--r--ChangeLog5
-rw-r--r--generic/ttk/ttkTrace.c2
-rw-r--r--tests/ttk/ttk.test19
3 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 5ed5095..b042078 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-06-29 Don Porter <dgp@users.sourceforge.net>
+
+ * generic/ttk/ttkTrace.c: [Bug 3341056] Correct segfault due to flaw
+ * tests/ttk/ttk.test: in the 2011-06-17 commit.
+
2011-06-23 Don Porter <dgp@users.sourceforge.net>
* changes: Updated for 8.5.10 release.
diff --git a/generic/ttk/ttkTrace.c b/generic/ttk/ttkTrace.c
index f171f3d..8bc8519 100644
--- a/generic/ttk/ttkTrace.c
+++ b/generic/ttk/ttkTrace.c
@@ -136,7 +136,7 @@ void Ttk_UntraceVariable(Ttk_TraceHandle *h)
* with removing is present.
*/
while ((cd = Tcl_VarTraceInfo(h->interp, Tcl_GetString(h->varnameObj),
- 0, VarTraceProc, cd)) != NULL) {
+ TCL_GLOBAL_ONLY, VarTraceProc, cd)) != NULL) {
if (cd == (ClientData) h) {
break;
}
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index 1eec180..5a982b6 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -560,12 +560,29 @@ test ttk-15.1 {Bug 3062331} -setup {
} -body {
set Y {}
ttk::button .b -textvariable Y
- trace variable Y u "destroy .b"
+ trace variable Y u "destroy .b; #"
unset Y
} -cleanup {
destroy .b
} -result {}
+test ttk-15.2 {Bug 3341056} -setup {
+ proc foo {} {
+ destroy .lf
+ ttk::labelframe .lf
+ ttk::checkbutton .lf.cb -text xxx
+ }
+} -body {
+ ttk::button .b -text xxx -command foo
+ .b invoke
+ .b invoke
+ .lf.cb invoke
+ destroy .b
+} -cleanup {
+ rename foo {}
+ destroy .lf
+} -result {}
+
## Test ensemble processing:
#
# (See also: SF#2021443)