summaryrefslogtreecommitdiff
path: root/embedvar.h
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-05-18 14:40:04 -0600
committerSawyer X <xsawyerx@cpan.org>2020-06-02 12:17:47 +0300
commit668d19980931e86058b46a58d0328c3b881b8aa1 (patch)
tree24af2a04d7083dfb544b75a6920ce1cc48fa36f0 /embedvar.h
parentcac6698e074af8daec0f7011cd77824d5d849d6f (diff)
downloadperl-668d19980931e86058b46a58d0328c3b881b8aa1.tar.gz
Make PL_utf8_foldclosures interpreter level
This resolves #17774. This ticket is because the fixes in GH #17154 failed to get every case, leaving this one outlier to be fixed by this commit. The text in https://github.com/Perl/perl5/issues/17154 gives extensive details as to the problem. But briefly, in an attempt to speed up interpreter cloning, I moved certain SVs from interpreter level to global level in e80a0113c4a8036dfb22aec44d0a9feb65d36fed (v5.27.11, March 2018). This was doable, we thought, because the content of these SVs is constant throughout the life of the program, so no need to copy them when cloning a new interpreter or thread. However when an interpreter exits, all its SVs get cleaned up, which caused these to become garbage in applications where another interpreter remains running. This circumstance is rare enough that the bug wasn't reported until September 2019, #17154. I made an initial attempt to fix the problem, and closed that ticket, but I overlooked one of the variables, which was reported in #17774, which this commit addresses. Effectively the behavior is reverted to the way it was before e80a0113c4a8036dfb22aec44d0a9feb65d36fed.
Diffstat (limited to 'embedvar.h')
-rw-r--r--embedvar.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/embedvar.h b/embedvar.h
index 5b6aa2b82a..de1aa999a8 100644
--- a/embedvar.h
+++ b/embedvar.h
@@ -352,6 +352,7 @@
#define PL_unsafe (vTHX->Iunsafe)
#define PL_utf8_charname_begin (vTHX->Iutf8_charname_begin)
#define PL_utf8_charname_continue (vTHX->Iutf8_charname_continue)
+#define PL_utf8_foldclosures (vTHX->Iutf8_foldclosures)
#define PL_utf8_idcont (vTHX->Iutf8_idcont)
#define PL_utf8_idstart (vTHX->Iutf8_idstart)
#define PL_utf8_mark (vTHX->Iutf8_mark)
@@ -497,8 +498,6 @@
#define PL_Guser_def_props_aTHX (my_vars->Guser_def_props_aTHX)
#define PL_user_prop_mutex (my_vars->Guser_prop_mutex)
#define PL_Guser_prop_mutex (my_vars->Guser_prop_mutex)
-#define PL_utf8_foldclosures (my_vars->Gutf8_foldclosures)
-#define PL_Gutf8_foldclosures (my_vars->Gutf8_foldclosures)
#define PL_veto_cleanup (my_vars->Gveto_cleanup)
#define PL_Gveto_cleanup (my_vars->Gveto_cleanup)
#define PL_watch_pvx (my_vars->Gwatch_pvx)