This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c: dump LABEL leaks its label
authorFather Chrysostomos <sprout@cpan.org>
Wed, 25 Jul 2012 23:40:37 +0000 (16:40 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 25 Jul 2012 23:40:37 +0000 (16:40 -0700)
./perl -Ilib -e 'warn $$; eval "sub { dump a }" while 1'

Watch the memory usage go up.

It didn’t have its own case in op_clear.

op.c

diff --git a/op.c b/op.c
index c818739..28fc225 100644 (file)
--- a/op.c
+++ b/op.c
@@ -808,6 +808,7 @@ Perl_op_clear(pTHX_ OP *o)
         }
 #endif
        break;
+    case OP_DUMP:
     case OP_GOTO:
     case OP_NEXT:
     case OP_LAST: