develooper Front page | perl.perl5.porters | Postings from July 2001

[PATCH] fixes perl_clone of perl_clone

From:
Artur Bergman
Date:
July 12, 2001 11:57
Subject:
[PATCH] fixes perl_clone of perl_clone
Message ID:
B773BFA4.236B%artur@contiller.se
Without the SvIVX we would crash in magic_get because of incorrect
PerlInterpreter. Increased REFCNT until more PL_perl_destruct_level stuff
becomes clear.

threads.pm test cases pass now.

artur

--- sv.c.foo    Thu Jul 12 19:51:06 2001
+++ sv.c    Thu Jul 12 19:53:03 2001
@@ -9798,7 +9798,10 @@
     SV** regexen = AvARRAY((AV*)proto_perl->Iregex_padav);
     for(i = 0; i <= len; i++) {
         av_push(PL_regex_padav,
-            newSViv((IV)re_dup((REGEXP *)SvIV(regexen[i]), param)));
+            SvREFCNT_inc(
+                        newSViv((IV)re_dup((REGEXP *)
+                             SvIVX(regexen[i]), param))
+                    ));
     }
     }
     PL_regex_pad = AvARRAY(PL_regex_padav);




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About