This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c0c5079
)
fix coredump in /(?{sub{}})/
author
Dave Mitchell
<davem@fdisolutions.com>
Sat, 6 Mar 2004 15:25:32 +0000
(15:25 +0000)
committer
Dave Mitchell
<davem@fdisolutions.com>
Sat, 6 Mar 2004 15:25:32 +0000
(15:25 +0000)
p4raw-id: //depot/perl@22445
pad.c
patch
|
blob
|
blame
|
history
diff --git
a/pad.c
b/pad.c
index
316833d
..
f2c7777
100644
(file)
--- a/
pad.c
+++ b/
pad.c
@@
-257,8
+257,11
@@
Perl_pad_undef(pTHX_ CV* cv)
CV *innercv = (CV*)curpad[ix];
namepad[ix] = Nullsv;
SvREFCNT_dec(namesv);
- curpad[ix] = Nullsv;
- SvREFCNT_dec(innercv);
+
+ if (SvREFCNT(comppad) < 2) { /* allow for /(?{ sub{} })/ */
+ curpad[ix] = Nullsv;
+ SvREFCNT_dec(innercv);
+ }
if (SvREFCNT(innercv) /* in use, not just a prototype */
&& CvOUTSIDE(innercv) == cv)
{