On Sat, Mar 08, 2003 at 01:39:06PM +0200, Enache Adrian wrote: > $ perl -e 'sub UNIVERSAL::DESTROY { warn } ; $b=1; $a=\$b; bless $a, ITCH' > Warning: something's wrong at -e line 1 during global destruction. > Warning: something's wrong at -e line 1 during global destruction. > Segmentation fault > > (three warnings in 5.8.0, one single in 5.6.1, and SEGV in all) This seems to guard against it: ------------------------------------------------------------------ --- /arc/perl-current/util.c 2003-03-03 08:45:50.000000000 +0200 +++ util.c 2003-03-08 14:54:12.000000000 +0200 @@ -1242,7 +1242,7 @@ Perl_vwarn(pTHX_ const char* pat, va_lis } /* if STDERR is tied, use it instead */ - if (PL_stderrgv && (io = GvIOp(PL_stderrgv)) + if (PL_stderrgv && SvREFCNT(PL_stderrgv) && (io = GvIOp(PL_stderrgv)) && (mg = SvTIED_mg((SV*)io, PERL_MAGIC_tiedscalar))) { dSP; ENTER; PUSHMARK(SP); ------------------------------------------------------------------ Regards AdiThread Previous | Thread Next