diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-12-31 12:07:37 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-12-31 12:07:37 +0000 |
commit | db4997f00d6b1ad267e4fec6a272e72e29719dd1 (patch) | |
tree | 9b20cf182c515f776a2512797f6b6f5a5b670b78 /toke.c | |
parent | 1cb9cd5016282146cd55ab904078500def5f5754 (diff) | |
download | perl-db4997f00d6b1ad267e4fec6a272e72e29719dd1.tar.gz |
PL_linestr needs to survive until the end of scope, not just the next
FREETMPS. Fixes the underlying cause of the thread cloning SEGV
reported in http://www.nntp.perl.org/group/perl.perl5.porters/63123
p4raw-id: //depot/perl@29643
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -668,6 +668,10 @@ Perl_lex_start(pTHX_ SV *line) sv_catpvs(PL_linestr, "\n;"); } SvTEMP_off(PL_linestr); + /* PL_linestr needs to survive until end of scope, not just the next + FREETMPS. See changes 17505 and 17546 which fixed the symptoms only. */ + SvREFCNT_inc_simple_void_NN(PL_linestr); + SAVEFREESV(PL_linestr); PL_oldoldbufptr = PL_oldbufptr = PL_bufptr = PL_linestart = SvPVX(PL_linestr); PL_bufend = PL_bufptr + SvCUR(PL_linestr); PL_last_lop = PL_last_uni = NULL; |