This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix coredump when upgrading PL_sv_yes in a second call to
authorGurusamy Sarathy <gsar@cpan.org>
Fri, 17 Mar 2000 22:37:21 +0000 (22:37 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Fri, 17 Mar 2000 22:37:21 +0000 (22:37 +0000)
perl_construct() (from Doug MacEachern)

p4raw-id: //depot/perl@5789

perl.c

diff --git a/perl.c b/perl.c
index f80ee95..578fafc 100644 (file)
--- a/perl.c
+++ b/perl.c
@@ -683,12 +683,12 @@ perl_destruct(pTHXx)
     SvREFCNT(&PL_sv_yes) = 0;
     sv_clear(&PL_sv_yes);
     SvANY(&PL_sv_yes) = NULL;
-    SvREADONLY_off(&PL_sv_yes);
+    SvFLAGS(&PL_sv_yes) = 0;
 
     SvREFCNT(&PL_sv_no) = 0;
     sv_clear(&PL_sv_no);
     SvANY(&PL_sv_no) = NULL;
-    SvREADONLY_off(&PL_sv_no);
+    SvFLAGS(&PL_sv_no) = 0;
 
     SvREFCNT(&PL_sv_undef) = 0;
     SvREADONLY_off(&PL_sv_undef);