{
dVAR; dSP; dMARK; dORIGMARK;
PerlIO *fp;
- SV *sv;
+ SV *sv = NULL;
GV * const gv
= (PL_op->op_flags & OPf_STACKED) ? MUTABLE_GV(*++MARK) : PL_defoutgv;
}
}
- sv = newSV(0);
if (!io) {
report_evil_fh(gv);
SETERRNO(EBADF,RMS_IFI);
goto just_say_no;
}
else {
+ sv = newSV(0);
do_sprintf(sv, SP - MARK, MARK + 1);
if (!do_print(sv, fp))
goto just_say_no;
use Config;
-plan tests => 43;
+plan tests => 44;
# run some code N times. If the number of SVs at the end of loop N is
# greater than (N-1)*delta at the end of loop 1, we've got a leak
}, "/(?{})\$x/ where \$x is $t does not leak");
}
}
+
+
+{
+ use warnings FATAL => 'all';
+ leak(2, 0, sub {
+ eval { printf uNopened 42 };
+ }, 'printfing to bad handle under fatal warnings does not leak');
+
+}