This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Latch LC_NUMERIC during critical sections
[perl5.git] / sv.c
diff --git a/sv.c b/sv.c
index df98a95..2c3da0f 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -15235,6 +15235,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_in_utf8_CTYPE_locale = proto_perl->Iin_utf8_CTYPE_locale;
     PL_in_utf8_COLLATE_locale = proto_perl->Iin_utf8_COLLATE_locale;
     my_strlcpy(PL_locale_utf8ness, proto_perl->Ilocale_utf8ness, sizeof(PL_locale_utf8ness));
+    PL_lc_numeric_mutex_depth = 0;
     /* Unicode features (see perlrun/-C) */
     PL_unicode         = proto_perl->Iunicode;
 
@@ -15569,6 +15570,9 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
     PL_langinfo_buf = NULL;
     PL_langinfo_bufsize = 0;
 
+    PL_setlocale_buf = NULL;
+    PL_setlocale_bufsize = 0;
+
     /* Unicode inversion lists */
     PL_Latin1          = sv_dup_inc(proto_perl->ILatin1, param);
     PL_UpperLatin1     = sv_dup_inc(proto_perl->IUpperLatin1, param);