diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2005-02-10 18:58:30 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2005-02-10 18:58:30 (GMT) |
commit | 07e0b116171eb0e1b10cd691be7995103106a174 (patch) | |
tree | 65db8e9dc92a108560b7f32ffb095ae7e7ef52c6 /tests | |
parent | 7c7f5ce019e8eff60777b642821f2232c1ef7d3b (diff) | |
download | tcl-07e0b116171eb0e1b10cd691be7995103106a174.zip tcl-07e0b116171eb0e1b10cd691be7995103106a174.tar.gz tcl-07e0b116171eb0e1b10cd691be7995103106a174.tar.bz2 |
* generic/tclBasic.c (Tcl_EvalObjEx):
* tests/basic.test (basic-26.2): preserve the arguments passed to
TEOV in the pure-list branch, in case the list shimmers away. Fix
for [Bug 1119369], reported by Peter MacDonald.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/basic.test | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tests/basic.test b/tests/basic.test index 294746f..2c8a6a7 100644 --- a/tests/basic.test +++ b/tests/basic.test @@ -15,7 +15,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: basic.test,v 1.25.2.5 2004/10/26 20:14:32 dgp Exp $ +# RCS: @(#) $Id: basic.test,v 1.25.2.6 2005/02/10 18:58:36 msofer Exp $ # package require tcltest 2 @@ -432,6 +432,24 @@ test basic-26.1 {Tcl_EvalObj: preserve object while evaling it} { set x } "foo\n while executing\n\"error foo\"" +test basic-26.2 {Tcl_EvalObjEx, pure-list branch: preserve "objv"} { + # + # Follow the pure-list branch in a manner that + # a - the pure-list internal rep is destroyed by shimmering + # b - the command returns an error + # As the error code in Tcl_EvalObjv accesses the list elements, this will + # cause a segfault if [Bug 1119369] has not been fixed. + # + + set SRC [list foo 1] ;# pure-list command + proc foo str { + # Shimmer pure-list to cmdName, cleanup and error + proc $::SRC {} {}; $::SRC + error "BAD CALL" + } + catch {eval $SRC} +} 1 + test basic-27.1 {Tcl_ExprLong} {emptyTest} { } {} |