/* As the absolutely last thing, free the non-arena SV for mess() */
if (PL_mess_sv) {
+ /* it could have accumulated taint magic */
+ if (SvTYPE(PL_mess_sv) >= SVt_PVMG) {
+ MAGIC* mg;
+ MAGIC* moremagic;
+ for (mg = SvMAGIC(PL_mess_sv); mg; mg = moremagic) {
+ moremagic = mg->mg_moremagic;
+ if (mg->mg_ptr && mg->mg_type != 'g' && mg->mg_len >= 0)
+ Safefree(mg->mg_ptr);
+ Safefree(mg);
+ }
+ }
/* we know that type >= SVt_PV */
SvOOK_off(PL_mess_sv);
Safefree(SvPVX(PL_mess_sv));
print "1..0\n";
exit 0;
}
- $ENV{PERL_DESTRUCT_LEVEL} = 0; # XXX known trouble with global destruction
+
+ # XXX known trouble with global destruction
+ $ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
}
$| = 1;
print "1..14\n";
print "1..58\n";
-$ENV{PERL_DESTRUCT_LEVEL} = 0; # XXX known to leaks scalars
+# XXX known to leak scalars
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
sub foo {
local($a, $b) = @_;
}
eval 'use Config'; # Defaults assumed if this fails
-$ENV{PERL_DESTRUCT_LEVEL} = 0; # XXX known to leaks scalars
+# XXX known to leak scalars
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
$x = "abc\ndef\n";
#!./perl
-$ENV{PERL_DESTRUCT_LEVEL} = 0; # XXX known to leaks scalars
+# XXX known to leak scalars
+$ENV{PERL_DESTRUCT_LEVEL} = 0 unless $ENV{PERL_DESTRUCT_LEVEL} > 3;
# The tests are in a separate file 't/op/re_tests'.
# Each line in that file is a separate test.