From 28fa5866e5d7d7cfd06c0b3dbab330672c05b992 Mon Sep 17 00:00:00 2001 From: dgp Date: Sun, 5 Jul 2015 16:52:27 +0000 Subject: [a0ece9d6d4] The cmd field of a CmdFrame when non-NULL must point within the string of the corresponding codePtr->source. --- generic/tclExecute.c | 1 - tests/execute.test | 9 +++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 38f11f2..d12a25c 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -9904,7 +9904,6 @@ TclGetSourceFromFrame( cfPtr->cmdObj = Tcl_NewStringObj(cfPtr->cmd, cfPtr->len); } else { cfPtr->cmdObj = Tcl_NewListObj(objc, objv); - cfPtr->cmd = Tcl_GetStringFromObj(cfPtr->cmdObj, &cfPtr->len); } Tcl_IncrRefCount(cfPtr->cmdObj); } diff --git a/tests/execute.test b/tests/execute.test index aaf4bc0..9a2ffbd 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -1057,6 +1057,15 @@ test execute-11.2 {Bug 268b23df11} -setup { rename crash {} rename zero {} } -result 0 +test execute-11.3 {Bug a0ece9d6d4} -setup { + proc crash {} {expr {rand()}} + trace add execution crash enterstep {apply {args {info frame -2}}} +} -body { + string is double [crash] +} -cleanup { + trace remove execution crash enterstep {apply {args {info frame -2}}} + rename crash {} +} -result 1 # cleanup if {[info commands testobj] != {}} { -- cgit v0.12