diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-06-06 00:42:59 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-06-06 00:42:59 +0000 |
commit | f807eda9ff3570fa55edf97b589a9c028d9c5bb8 (patch) | |
tree | 8ef406e88c4714c888ee606dae3892aca44d757b /perl.c | |
parent | 63caf6080702341afbd2806f3d0b2bb9ccae687d (diff) | |
download | perl-f807eda9ff3570fa55edf97b589a9c028d9c5bb8.tar.gz |
Perl_eval_pv() leaks 4 bytes every time it is called because it
does a PUSHMARK that's never ever POPMARKed; in general, only
Perl_call_[sp]v() need a PUSHMARK for incoming arguments;
Perl_eval_[sp]v() don't because they don't take any incoming
arguments (this leak has been around since the original version
of perl_eval_pv() in 5.003_97e)
p4raw-id: //depot/perl@6201
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1784,9 +1784,9 @@ S_call_body(pTHX_ OP *myop, int is_eval) if (PL_op == myop) { if (is_eval) - PL_op = Perl_pp_entereval(aTHX); + PL_op = Perl_pp_entereval(aTHX); /* this doesn't do a POPMARK */ else - PL_op = Perl_pp_entersub(aTHX); + PL_op = Perl_pp_entersub(aTHX); /* this does */ } if (PL_op) CALLRUNOPS(aTHX); @@ -1908,7 +1908,6 @@ Perl_eval_pv(pTHX_ const char *p, I32 croak_on_error) dSP; SV* sv = newSVpv(p, 0); - PUSHMARK(SP); eval_sv(sv, G_SCALAR); SvREFCNT_dec(sv); |