Enache Adrian wrote, some time ago : > > > When the time comes for the qr// to be freed, the code inside > > > sv_clear() tries to call its DESTROY method - since it is an > > > object. (sv.c:5261) > > > DESTROY doesn't exist in the 'Regexp' stash: if the user defined > > > a UNIVERSAL::AUTOLOAD sub, that will be called instead. > > > If that AUTOLOAD uses qr//'s, the recursion happens. > ... > > > I have 2 ideas to fix that: > ... > > > 2) Put a dummy DESTROY method in the 'Regexp' stash. > > Here is a patch that does the second ( in the most naive way ) I applied it as #19277. > I added a new test file too (t/run/crash.t) to test for this > kind of final cleanup crashes, etc. I moved it to t/op/ref.t. > The first test there is > for another bug, see > http://nntp.perl.org/group/perl.perl5.porters/73117 > > I didn't think it should be a TODO test since it's already done :) Er, you fix doesn't work for me, or at least it ceased to work, since I remember it worked. That would be this test : > +runperl(prog => 'sub UNIVERSAL::DESTROY { warn } bless \$a, A', stderr => 1); > +ok ($? == 0, 'warn called inside UNIVERSAL::DESTROY { }'); -- Undermines is not *NIXThread Previous | Thread Next