This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix memory leak in C<sub f { @_ = 1 } f() while 1>
authorGurusamy Sarathy <gsar@cpan.org>
Wed, 8 Sep 1999 00:52:50 +0000 (00:52 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Wed, 8 Sep 1999 00:52:50 +0000 (00:52 +0000)
p4raw-id: //depot/perl@4102

cop.h
pp_hot.c

diff --git a/cop.h b/cop.h
index d0a59a0..6ea045a 100644 (file)
--- a/cop.h
+++ b/cop.h
@@ -76,6 +76,7 @@ struct block_sub {
            /* destroy arg array */                                     \
            av_clear(cxsub.argarray);                                   \
            AvREAL_off(cxsub.argarray);                                 \
+           AvREIFY_on(cxsub.argarray);                                 \
        }                                                               \
        if (cxsub.cv) {                                                 \
            if (!(CvDEPTH(cxsub.cv) = cxsub.olddepth))                  \
index bb034e5..7c7bc50 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2512,6 +2512,7 @@ try_autoload:
            if (AvREAL(av)) {
                av_clear(av);
                AvREAL_off(av);
+               AvREIFY_on(av);
            }
 #ifndef USE_THREADS
            cx->blk_sub.savearray = GvAV(PL_defgv);