From d33ee7bc07e1c461c4292dfe866e2400f2536367 Mon Sep 17 00:00:00 2001 From: pooryorick Date: Wed, 1 Nov 2017 22:21:50 +0000 Subject: Unit test for issue 3c32a3f8bd, Segmentation fault in TclOO.c/ReleaseClassContents() for a class mixed into one of its instances. --- tests/oo.test | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) 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 -- cgit v0.12