diff options
author | Karl Williamson <khw@cpan.org> | 2019-11-24 20:48:54 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2019-11-26 19:38:14 -0700 |
commit | a8def808210e08cea0b7889fea7c5146b21af4ed (patch) | |
tree | 40bd3017953f36bf853b7dec6c07e818d1d3588e /perlvars.h | |
parent | e4b61f959ac649d109da4ede1fba8cfa793a79a4 (diff) | |
download | perl-a8def808210e08cea0b7889fea7c5146b21af4ed.tar.gz |
Move regex global variables to interpreter level
This is part of fixing gh #17154
This scenario from the ticket
(https://github.com/Perl/perl5/issues/17154#issuecomment-558877358)
shows why this fix is necessary:
main interpreter initializes PL_AboveLatin1 to an SV it owns
loads threads::lite and creates a new thread/interpreter which
initializes PL_AboveLatin1 to a SV owned by the new interpreter
threads::lite child interpreter finishes, freeing all of its SVs,
PL_AboveLatin1 is now invalid
main interpreter uses a regexp that relies on PL_AboveLatin1, dies
horribly.
By making these interpreter level variables, this is avoided. There is
extra copying, but it is just the SV headers, as the real data is kept
as static C arrays.
Diffstat (limited to 'perlvars.h')
-rw-r--r-- | perlvars.h | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/perlvars.h b/perlvars.h index 976649a409..2137554404 100644 --- a/perlvars.h +++ b/perlvars.h @@ -275,41 +275,6 @@ PERLVARA(G, hash_chars, (1+256) * sizeof(U32), unsigned char) /* perl.c and hv.h PERLVAR(G, perllib_sep, char) #endif -PERLVAR(G, AboveLatin1, SV *) -PERLVAR(G, Assigned_invlist, SV *) -PERLVAR(G, GCB_invlist, SV *) -PERLVAR(G, HasMultiCharFold, SV *) -PERLVAR(G, InMultiCharFold, SV *) -PERLVAR(G, Latin1, SV *) -PERLVAR(G, LB_invlist, SV *) -PERLVAR(G, SB_invlist, SV *) -PERLVAR(G, SCX_invlist, SV *) -PERLVAR(G, UpperLatin1, SV *) /* Code points 128 - 255 */ - -/* List of characters that participate in any fold defined by Unicode */ -PERLVAR(G, in_some_fold, SV *) - -PERLVAR(G, utf8_idcont, SV *) -PERLVAR(G, utf8_idstart, SV *) -PERLVAR(G, utf8_perl_idcont, SV *) -PERLVAR(G, utf8_perl_idstart, SV *) -PERLVAR(G, utf8_xidcont, SV *) -PERLVAR(G, utf8_xidstart, SV *) -PERLVAR(G, WB_invlist, SV *) -PERLVARA(G, XPosix_ptrs, POSIX_CC_COUNT, SV *) -PERLVARA(G, Posix_ptrs, POSIX_CC_COUNT, SV *) -PERLVAR(G, utf8_toupper, SV *) -PERLVAR(G, utf8_totitle, SV *) -PERLVAR(G, utf8_tolower, SV *) -PERLVAR(G, utf8_tofold, SV *) -PERLVAR(G, utf8_tosimplefold, SV *) -PERLVAR(G, utf8_charname_begin, SV *) -PERLVAR(G, utf8_charname_continue, SV *) -PERLVAR(G, utf8_mark, SV *) -PERLVARI(G, InBitmap, SV *, NULL) -PERLVAR(G, CCC_non0_non230, SV *) -PERLVAR(G, Private_Use, SV *) - /* Definitions of user-defined \p{} properties, as the subs that define them * are only called once */ PERLVARI(G, user_def_props, HV *, NULL) |