diff options
author | pooryorick <com.digitalsmarties@pooryorick.com> | 2018-02-14 12:31:33 (GMT) |
---|---|---|
committer | pooryorick <com.digitalsmarties@pooryorick.com> | 2018-02-14 12:31:33 (GMT) |
commit | c6eb0cc51d7c4feece753d3536454bf43d7785a3 (patch) | |
tree | 7151460349c7305f624e4b0280f7a6bfe0cc4449 /tests/oo.test | |
parent | a7c17bc224dea481e831d6da7f924d8e064a5506 (diff) | |
download | tcl-c6eb0cc51d7c4feece753d3536454bf43d7785a3.zip tcl-c6eb0cc51d7c4feece753d3536454bf43d7785a3.tar.gz tcl-c6eb0cc51d7c4feece753d3536454bf43d7785a3.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 8face06..0ae46f8 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 |