diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-18 13:50:03 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-01-18 13:50:03 (GMT) |
commit | c246782cc0bc14600f737dfc07d0bc3853d95dd4 (patch) | |
tree | 15edbecb894fd8e2daad2287e1441ab6dc1615b0 /tests/oo.test | |
parent | 57ab68714417969c9ff520967d92a7e3dde7a66d (diff) | |
download | tcl-c246782cc0bc14600f737dfc07d0bc3853d95dd4.zip tcl-c246782cc0bc14600f737dfc07d0bc3853d95dd4.tar.gz tcl-c246782cc0bc14600f737dfc07d0bc3853d95dd4.tar.bz2 |
* generic/tclOOMethod.c (PushMethodCallFrame): [Bug 3001438]: Make
sure that the cmdPtr field of the procPtr is correct and relevant at
all times so that [info frame] can report sensible information about a
frame after a return to it from a recursive call, instead of probably
crashing (depending on what else has overwritten the Tcl stack!)
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/oo.test b/tests/oo.test index fbeecc6..1954d1b 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -7,7 +7,7 @@ # See the file "license.terms" for information on usage and redistribution of # this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: oo.test,v 1.43 2011/01/01 15:14:43 dkf Exp $ +# RCS: @(#) $Id: oo.test,v 1.44 2011/01/18 13:50:03 dkf Exp $ package require -exact TclOO 0.6.2 ;# Must match value in generic/tclOO.h package require tcltest 2 @@ -2235,6 +2235,18 @@ test oo-22.1 {OO and info frame} -setup { } -cleanup { c destroy } -result {1 {{type source line * file * cmd {info frame 0} method frames class ::c level 0} {type source line * file * cmd {info frame 0} method frames object ::i level 0}} ::c} +test oo-22.2 {OO and info frame: Bug 3001438} -setup { + oo::class create c +} -body { + oo::define c method test {{x 1}} { + if {$x} {my test 0} + lsort {q w e r t y u i o p}; # Overwrite the Tcl stack + info frame 0 + } + [c new] test +} -match glob -cleanup { + c destroy +} -result {* cmd {info frame 0} method test class ::c level 0} # Prove that the issue in [Bug 1865054] isn't an issue any more test oo-23.1 {Self-like derivation; complex case!} -setup { |