diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-01 22:21:50 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2017-11-01 22:21:50 (GMT) |
commit | d33ee7bc07e1c461c4292dfe866e2400f2536367 (patch) | |
tree | 4751b003dbf1e5cf56e670fa326c96b8124df4cb /tests/oo.test | |
parent | 8bb421f959a1a5cb8a552a423341b4a7896b042c (diff) | |
download | tcl-d33ee7bc07e1c461c4292dfe866e2400f2536367.zip tcl-d33ee7bc07e1c461c4292dfe866e2400f2536367.tar.gz tcl-d33ee7bc07e1c461c4292dfe866e2400f2536367.tar.bz2 |
Unit test for issue 3c32a3f8bd, Segmentation fault in
TclOO.c/ReleaseClassContents() for a class mixed into one of its instances.
Diffstat (limited to 'tests/oo.test')
-rw-r--r-- | tests/oo.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/oo.test b/tests/oo.test index 6413094..b6af1ee 100644 --- a/tests/oo.test +++ b/tests/oo.test @@ -1495,6 +1495,24 @@ test oo-11.5 {OO: cleanup} { return done } done +test oo-11.6 { + OO: cleanup ReleaseClassContents() where class is mixed into one of its + instances +} { + oo::class create obj1 + ::oo::define obj1 {self mixin [self]} + + ::oo::copy obj1 obj2 + ::oo::objdefine obj2 {mixin [self]} + + ::oo::copy obj2 obj3 + trace add command obj3 delete [list obj3 dying] + rename obj2 {} + + # No segmentation fault + return done +} done + test oo-12.1 {OO: filters} { oo::class create Aclass Aclass create Aobject |