Branch: refs/heads/smoke-me/khw-env Home: https://github.com/Perl/perl5 Commit: 96983bca53fc4d6db480d8cebdeb130353dab767 https://github.com/Perl/perl5/commit/96983bca53fc4d6db480d8cebdeb130353dab767 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023)
Changed paths: M cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm Log Message: ----------- BlackBox dont use rare scripts Commit: 732c21749091b082938447dcd987119130e92d16 https://github.com/Perl/perl5/commit/732c21749091b082938447dcd987119130e92d16 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/harness Log Message: ----------- XXX t/harness temp tweaks Commit: 7c693ec48ad1ca92ec31234c86a651a1c6ff61b1 https://github.com/Perl/perl5/commit/7c693ec48ad1ca92ec31234c86a651a1c6ff61b1 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/harness Log Message: ----------- XXX skip croak.t under sanitizer Commit: 5134d59cee1292651f0413b98b28b7c9218e397b https://github.com/Perl/perl5/commit/5134d59cee1292651f0413b98b28b7c9218e397b Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/porting/bincompat.t Log Message: ----------- skip bincompat.t Commit: 7ce0aa78e231ff39c02002b00119a35858f9ee51 https://github.com/Perl/perl5/commit/7ce0aa78e231ff39c02002b00119a35858f9ee51 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/TEST Log Message: ----------- XXX skip cpan testing Commit: efac274cf509e822794f0bd127af5f2fd7f8bdc7 https://github.com/Perl/perl5/commit/efac274cf509e822794f0bd127af5f2fd7f8bdc7 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M dist/Tie-File/t/29a_upcopy.t Log Message: ----------- XXX temp: dist/Tie-File/t/29a_upcopy.t: Up alarm Commit: b48c03c604950c653919a7264672078471a13df8 https://github.com/Perl/perl5/commit/b48c03c604950c653919a7264672078471a13df8 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M MANIFEST M charclass_invlists.h M lib/unicore/mktables M lib/unicore/uni_keywords.pl M regcharclass.h A t/re/uniprops11.t A t/re/uniprops12.t A t/re/uniprops13.t A t/re/uniprops14.t A t/re/uniprops15.t A t/re/uniprops16.t A t/re/uniprops17.t A t/re/uniprops18.t A t/re/uniprops19.t A t/re/uniprops20.t A t/re/uniprops21.t A t/re/uniprops22.t A t/re/uniprops23.t A t/re/uniprops24.t M uni_keywords.h Log Message: ----------- uniprops 24 Commit: 6855061c6131a8c9eb9e0fd6f49e02c3a0cfe2a9 https://github.com/Perl/perl5/commit/6855061c6131a8c9eb9e0fd6f49e02c3a0cfe2a9 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M MANIFEST A t/uni/idstart.pl A t/uni/idstart00.t A t/uni/idstart01.t A t/uni/idstart02.t A t/uni/idstart03.t A t/uni/idstart04.t A t/uni/idstart05.t A t/uni/idstart06.t A t/uni/idstart07.t A t/uni/idstart08.t A t/uni/idstart09.t A t/uni/idstart10.t A t/uni/idstart11.t A t/uni/idstart12.t A t/uni/idstart13.t A t/uni/idstart14.t A t/uni/idstart15.t A t/uni/idstart16.t A t/uni/idstart17.t A t/uni/idstart18.t A t/uni/idstart19.t A t/uni/idstart20.t A t/uni/idstart21.t A t/uni/idstart22.t A t/uni/idstart23.t M t/uni/variables.t Log Message: ----------- Split t/uni/variables.t into multiple tests These can be done in parallel; otherwise this is often the test that finishes last, holding up the test suite completion. Commit: 654f36960e2d0270b69b1345d24e935ed1bb9603 https://github.com/Perl/perl5/commit/654f36960e2d0270b69b1345d24e935ed1bb9603 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/test.pl Log Message: ----------- XXX test.pl: dont unlink temps Commit: 382deb540de9c5192232671adde71fde1d89be26 https://github.com/Perl/perl5/commit/382deb540de9c5192232671adde71fde1d89be26 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/test.pl Log Message: ----------- Revert "XXX test.pl: dont unlink temps" This reverts commit 1579ce0dbce549cb594214ba27d4e2fa389f891b. Commit: 7bb3648d283368d1a439ebe67b81791a0d4d665d https://github.com/Perl/perl5/commit/7bb3648d283368d1a439ebe67b81791a0d4d665d Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/run/locale.t Log Message: ----------- run/locale.t: more debug Commit: e6982e4df6e7e37b11fe6b0fff4b54f72e10151c https://github.com/Perl/perl5/commit/e6982e4df6e7e37b11fe6b0fff4b54f72e10151c Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/run/locale.t Log Message: ----------- XXX run/locale.t: maybe f move test Commit: 97cfc25c993492b05acd706727d497000e87b774 https://github.com/Perl/perl5/commit/97cfc25c993492b05acd706727d497000e87b774 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- version::07locale.t: Use I18N::Langinfo, not POSIX::localeconv() The former is always present; the latter might not be. Commit: 5cb8110a58b632aa6fee80f26b18904527efa839 https://github.com/Perl/perl5/commit/5cb8110a58b632aa6fee80f26b18904527efa839 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t prob. due to 5.38 tag issue Commit: 10c326abfe41d548ef8fd61c27bcce4da2dcf929 https://github.com/Perl/perl5/commit/10c326abfe41d548ef8fd61c27bcce4da2dcf929 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- version 07locale.t should use LC_NUMERIC, not ALL These outliers don't belong. This file is working on LC_NUMERIC only. Commit: df75481a6e2f3e7994f88a903b21ade741047047 https://github.com/Perl/perl5/commit/df75481a6e2f3e7994f88a903b21ade741047047 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Archive-Tar/t/02_methods.t Log Message: ----------- XXX skip Archive-Tar because of symlinks Commit: 0c12a43499001032267d7f7997c008719be3b972 https://github.com/Perl/perl5/commit/0c12a43499001032267d7f7997c008719be3b972 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/porting/cmp_version.t Log Message: ----------- XXX skip cmp_version.t because of sym links Commit: a788f2e28393f253df3e4ae9abc61357c2cc43b3 https://github.com/Perl/perl5/commit/a788f2e28393f253df3e4ae9abc61357c2cc43b3 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- XXX temp to test broken lconv on non-Windows Commit: 7b5d016391d9b8b37b2717e01bfbe91c5472b1f0 https://github.com/Perl/perl5/commit/7b5d016391d9b8b37b2717e01bfbe91c5472b1f0 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Sys-Syslog/t/syslog-inet-udp.t M cpan/Sys-Syslog/t/syslog.t Log Message: ----------- XXX skip syslog tests because fail without LC_TIME Commit: 5291dc8cb250307fc03e499273064669edd7e87d https://github.com/Perl/perl5/commit/5291dc8cb250307fc03e499273064669edd7e87d Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M makedef.pl M perl.h Log Message: ----------- XXX temporary: Allow undef LC_ALL Commit: a7aa632321501fcd05709ea606ee9cf83bba3f23 https://github.com/Perl/perl5/commit/a7aa632321501fcd05709ea606ee9cf83bba3f23 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- perl.h: Fake up win32 compile a bit Commit: 74593707c01d5990b769f5f311b17f0ef5c41e74 https://github.com/Perl/perl5/commit/74593707c01d5990b769f5f311b17f0ef5c41e74 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- ruler Commit: 62af983b41472da9ba3507e68f6810a0ff8d0b2c https://github.com/Perl/perl5/commit/62af983b41472da9ba3507e68f6810a0ff8d0b2c Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M sv.c Log Message: ----------- newSVbool(): Fix compiler warning The parameter was declared const in embed.fnc, but not in the function prototype Commit: 9b77e9c46b2eff0de1ad9ccb68f0eddd1a167535 https://github.com/Perl/perl5/commit/9b77e9c46b2eff0de1ad9ccb68f0eddd1a167535 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M proto.h Log Message: ----------- regnode_after(): Fix compiler warning A parameter to this function was declared const in its prototype but not in embed.fnc. Commit: 9a3778136a8a331ed7006583a811ad4138629f9d https://github.com/Perl/perl5/commit/9a3778136a8a331ed7006583a811ad4138629f9d Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M proto.h M utf8.c Log Message: ----------- uvoffuni_to_utf8_flags_msgs(): Fix compiler warning A parameter to this function was declared const in embed.fnc, but isn't const. This commit also adds a const to another parameter that is constant. Commit: 44b1983f7bbe26d7099a548b70c9f4e9b4af4889 https://github.com/Perl/perl5/commit/44b1983f7bbe26d7099a548b70c9f4e9b4af4889 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M proto.h Log Message: ----------- S_clear_placeholders(): Fix compiler warning A parameter to this function was declared const in its prototype but not in embed.fnc, and had a different name Commit: 8124f9b8673f63d4d192c3103c660831fb13f438 https://github.com/Perl/perl5/commit/8124f9b8673f63d4d192c3103c660831fb13f438 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M proto.h M util.c Log Message: ----------- XXX memlog Commit: c308a229e29ceb49175301694e2691a5c1495ddf https://github.com/Perl/perl5/commit/c308a229e29ceb49175301694e2691a5c1495ddf Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h M t/run/switchDx.t Log Message: ----------- debug thread Commit: 590d8c4f6f26aaf9d50ebc7382d7c004cfec4513 https://github.com/Perl/perl5/commit/590d8c4f6f26aaf9d50ebc7382d7c004cfec4513 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M dist/threads/threads.xs Log Message: ----------- threads.xs DEBUG_U Commit: 8826519e5aa386debe1462ba35043243b58069c2 https://github.com/Perl/perl5/commit/8826519e5aa386debe1462ba35043243b58069c2 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale.t Log Message: ----------- XXX temp: lib/locale.t: debug Commit: 93d05135363cf428be4ae7f0eb8dd92a181e1940 https://github.com/Perl/perl5/commit/93d05135363cf428be4ae7f0eb8dd92a181e1940 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t FILE debug Commit: db28cd09f07d7077984c64eaf22a01ed04a274df https://github.com/Perl/perl5/commit/db28cd09f07d7077984c64eaf22a01ed04a274df Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale.t Log Message: ----------- lib/locale.t Commit: bb0c700641b381ea75c61e4e0481454674782425 https://github.com/Perl/perl5/commit/bb0c700641b381ea75c61e4e0481454674782425 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- XXX perl.h: Debugging mutex lock' Commit: 34a5374fc67f773dd9970236cd2bfba61d90cf0e https://github.com/Perl/perl5/commit/34a5374fc67f773dd9970236cd2bfba61d90cf0e Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/version/t/07locale.t M t/porting/customized.dat Log Message: ----------- 07locale.t: Add some Windows locales to try On various windows machines, none of the locales listed in <DATA> exist. This commit copies ones from core's loc_tools.pl to give additional possibilities to try Commit: c63345969135277ceebde985bf5dbe6699bbbc40 https://github.com/Perl/perl5/commit/c63345969135277ceebde985bf5dbe6699bbbc40 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/version/t/07locale.t Log Message: ----------- drop, bug have to recompute md5 Commit: 5ffc6001a651ae77178de116742bebfbf3cac158 https://github.com/Perl/perl5/commit/5ffc6001a651ae77178de116742bebfbf3cac158 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/porting/customized.dat Log Message: ----------- customized.dat Commit: 7c8873c0541735c1ee50becbcaa7e1cf27661964 https://github.com/Perl/perl5/commit/7c8873c0541735c1ee50becbcaa7e1cf27661964 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- S_find_locale_from_environment: Handle disparate LC_ALL Prior to this commit, it was possible on some platforms to improperly set a locale category from a locale of "". Consider: export LC_ALL="LC_CTYPE=de_DE;LC_NUMERIC=C;LC_TIME=de_DE;..." and then run print POSIX::setlocale(LC_NUMERIC, ""); It wouldn't know how to extract just the LC_NUMERIC part of the LC_ALL string. There is no test added because I didn't find a shell that allows setting LC_ALL to such a disparate value. Commit: 54599bcb2dc955e4bc81772a6fd903ee13dd3fdc https://github.com/Perl/perl5/commit/54599bcb2dc955e4bc81772a6fd903ee13dd3fdc Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools: XXX Debug Commit: 2d4dd814a163355a18a0a70cffd928d7af637557 https://github.com/Perl/perl5/commit/2d4dd814a163355a18a0a70cffd928d7af637557 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- S_querylocale_2008_i: Add entry assertion Commit: 37b774d5e3cc10e0bb268a1a5889a1f69a2cf978 https://github.com/Perl/perl5/commit/37b774d5e3cc10e0bb268a1a5889a1f69a2cf978 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- S_bool_setlocale_i: Add entry assertion Commit: d215173ccdf567806fce4967a99fd5cd5767ecc4 https://github.com/Perl/perl5/commit/d215173ccdf567806fce4967a99fd5cd5767ecc4 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- savepv if threaded, unused I think Commit: 82b507d2c5dad370fa0ba2cb1b5bcdb1e59e80f9 https://github.com/Perl/perl5/commit/82b507d2c5dad370fa0ba2cb1b5bcdb1e59e80f9 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Add a debugging statement This can be helpful in tracing what's happening with nl_langinfo() calls. Commit: 62774576fe938bd93ddce5bbf5a1290068305370 https://github.com/Perl/perl5/commit/62774576fe938bd93ddce5bbf5a1290068305370 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- XXX experimental: Define setlocale_i() on unsafe threaded builds On threaded Configurations where thread-safe locale handling is not available, perl automatically does a modicum of prevention of races by executing locale changes in a critical section, and copying the results to a thread-safe location. This commit defines setlocale_i() on such builds. This macro is used to bypass more complex handling required in fully thread-safe builds. I don't see how this changes thread-safeness on the unsafe builds, and it passes the tests, but I'm considering it experimental for now, until later in the development cycle. Commit: 14eba27e3cfd3fee9156d6d11f78f06b690e9ada https://github.com/Perl/perl5/commit/14eba27e3cfd3fee9156d6d11f78f06b690e9ada Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M hints/darwin.sh Log Message: ----------- darwin hints querylocale race in earlier darwins? Commit: e5c4a3661bb0576e491cdbcfbef8396144e6af56 https://github.com/Perl/perl5/commit/e5c4a3661bb0576e491cdbcfbef8396144e6af56 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M hints/freebsd.sh Log Message: ----------- Enable thread-safe locales on some freebsd versions This had been disabled in the hints file due to bugs, which perl now works around, so reenable (and reformat some lines for clarity) Commit: 2d5134a7a91d15c8b15e7ad91f77a7d7bdc25406 https://github.com/Perl/perl5/commit/2d5134a7a91d15c8b15e7ad91f77a7d7bdc25406 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/run/locale.t Log Message: ----------- t/run/locale.t: debug Commit: b62ba273a58ebd4e890b536a9b57054f865af0eb https://github.com/Perl/perl5/commit/b62ba273a58ebd4e890b536a9b57054f865af0eb Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: add a commented out yield Commit: ca1d8b5ec8e95acb01f1e74d0f0fd3f9167c85ee https://github.com/Perl/perl5/commit/ca1d8b5ec8e95acb01f1e74d0f0fd3f9167c85ee Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: debugging Commit: 34d53e97bb910ff420667b4006d971413267a92d https://github.com/Perl/perl5/commit/34d53e97bb910ff420667b4006d971413267a92d Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/porting/customized.dat Log Message: ----------- customized.dat for before Time Piece Commit: 9a31c32498618dde7032312d4b473e5b3e59c96e https://github.com/Perl/perl5/commit/9a31c32498618dde7032312d4b473e5b3e59c96e Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M embed.h M embedvar.h M handy.h M inline.h M intrpvar.h M locale.c M makedef.pl M mg.c M perl.c M perl.h M pod/perlvar.pod M proto.h M sv.c Log Message: ----------- Add ability to emulate thread-safe locale operations Locale information was originally global for an entire process. Later, it was realized that different threads could want to be running in different locales. Windows added this ability, and POSIX 2008 followed suit (though using a completely different API). When available, perl automatically uses these capabilities. But many platforms have neither, or their implementation, such as on Darwin, is buggy. This commit adds the capability for Perl programs to operate as if the platform were thread-safe. This implementation is based on the observation that the underlying locale matters only to relatively few libc calls, and only during their execution. It can be anything at all at any other time. perl keeps what the proper locale should be for each category in a a per-thread array. Each locale-dependent operation must be wrapped in mutex lock/unlock operations. The lock additionally compares what libc knows the locale to be, and what it should be for this thread at this time, and changes the actual locale to the proper value if necessary. That's all that is needed. This commit adds macros to perl.h, for example "MBTOWC_LOCK_", that expand to do the mutex lock, and change the global locale to the expected value. On perls built without this emulation capability, they are no-ops. All code in the perl core (unless I've missed something), are changed to use these macros (there weren't actually many places that needed this). Thus, any pure perl program will automatically become locale-thread-safe under this Configuration. In order for XS code to also become locale-thread-safe, it must use these macros to wrap calls to locale-dependent functions. Relatively few modules call such functions. For example, the only one I found that ships with the perl core is Time::Piece, and it has more fundamental issues with running under threads than this. I am preparing pull requests for it. Thus, this is not completely transparent to code like native-thread-safe locale handling is. Therefore ${^SAFE_LOCALES} returns 2 (instead of 1) for this type of thread-safety. Another deficiency compared to the native thread safety is when a thread calls a non-perl library that accesses the locale. The typical example is Gtk (though this particular application can be configured to not be problematic). With the native safe threads, everything works as long as only one such thread is used per Perl program. That thread would then be the only one operating in the global locale, hence there are no conflicts. With this emulation, all threads are operating in the global locale, and mutexes would have to be used to prevent conflicts. To minimize those, the code added in this commit restores the global locale when through to the state it was in when started. A major concern is the performance impact. This is after all trading speed for accuracy. lib/locale_threads.t is noticeably slower when this is being used. But that is doing multiple threads constantly using locale-dependent operations. I don't notice any change with the rest of the test suite. In pure perl, this only comes into play while in the scope of 'use locale' or when using some of the few POSIX:: functions that are locale-dependent. And to some extent when formatting, but the regular overhead there should dwarf what this adds. This commit leaves this feature off by default. The next commit changes that for the next few 5.39 development releases, so we can see if there is actually an issue. Commit: d7a4a50cacb93c67a25c0c2ce706663577e34f48 https://github.com/Perl/perl5/commit/d7a4a50cacb93c67a25c0c2ce706663577e34f48 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c M makedef.pl M perl.h Log Message: ----------- Experimentally enable per-thread locale emulation This is set to end in 5.39.10, but will give us field experience in the meantime. Commit: 2434391551a8cfd830613b60c2e3c38d174f62ab https://github.com/Perl/perl5/commit/2434391551a8cfd830613b60c2e3c38d174f62ab Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h M pod/perldelta.pod Log Message: ----------- Experimentally enable glibc undocumented querylocale() This is querylocale() by another name, and is undocumented, hence we haven't enabled it by default. But it seems to work fine. In order to gain wider experience in using it, it is here default-enabled through 5.39.9 (unless we decide to end the experiment earlier), at which point a compilation error will remind us to decide to keep it or take it out. I put the check in locale.c instead of the more obvious perl.h, because the definition would come earlier in perl.h than the PERL_VERSION macros are defined, and I don't think its worth moving things around for just a potential of a few releases. Commit: 4547b37ec32cffb258fcb549b89fc26894e0c9e0 https://github.com/Perl/perl5/commit/4547b37ec32cffb258fcb549b89fc26894e0c9e0 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- XXX perl.h maybe drop Commit: 36d7e7b66b7285a8b0954bbd5385f2ecf4eef654 https://github.com/Perl/perl5/commit/36d7e7b66b7285a8b0954bbd5385f2ecf4eef654 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: PL_cur_locale_obj is only POSIX 2008 multiplicity Commit: 39d1a5b2d09d13471bf117f720a144c3c6837ef2 https://github.com/Perl/perl5/commit/39d1a5b2d09d13471bf117f720a144c3c6837ef2 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M makedef.pl Log Message: ----------- makedef.pl: Move comment Commit: 1e339684e9578739329eff6cd0cbf3691975dbbf https://github.com/Perl/perl5/commit/1e339684e9578739329eff6cd0cbf3691975dbbf Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- Add DEBUG_SETLOCALE_INCONSISTENCIES Commit: f0372d2ea317a6a1a37237f1ea808795a18b5507 https://github.com/Perl/perl5/commit/f0372d2ea317a6a1a37237f1ea808795a18b5507 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M perl.h Log Message: ----------- Enable DEBUG_SETLOCALE_INCONSISTENCIES Commit: f73b3a9083073b39a28ec3df53bfae2edd462586 https://github.com/Perl/perl5/commit/f73b3a9083073b39a28ec3df53bfae2edd462586 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- add is_cur_locale_utf8 Commit: 94959a8cce0d2af103fd6e7cf8fd7133982c3a56 https://github.com/Perl/perl5/commit/94959a8cce0d2af103fd6e7cf8fd7133982c3a56 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time::Piece: Use reentrant API This single line magically makes this work much better under threading, though critical section locks need to be added as well. Commit: da40cb1d02e15a88eedbfe8cde017dc582a8c282 https://github.com/Perl/perl5/commit/da40cb1d02e15a88eedbfe8cde017dc582a8c282 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: Use foldEQ_locale() if available This core function available since 5.13.2 is thread-safe and knows about Perl internals, so is preferable to the similar libc function, which is now used only as a fallback. This commit also bomb proofs the code by adding an additional fallback, specified in C89, which isn't a great substitute, but far better than nothing. Commit: 520a53a14157a008bcacf3b7eb2bad4323441d01 https://github.com/Perl/perl5/commit/520a53a14157a008bcacf3b7eb2bad4323441d01 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: Use isSPACE_LC, not isspace; etc isDIGIT_LC() does the same thing as isdigit when everything goes well, but is more robust when things get more complicated. The _LC forms are thread safe, for example. But note that this code doesn't work properly for a UTF-8 locale, as it assumes that a byte and character are the same thing. A major overhaul would be needed to handle that. Commit: 5a78782b238f9c72a89102b239490b8d4170c70d https://github.com/Perl/perl5/commit/5a78782b238f9c72a89102b239490b8d4170c70d Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M thread.h Log Message: ----------- thread.h: White space only Indent some nested preproccessor defines Commit: a9c17edc99ee74c5e8337cbd9f226bc3c588c9c1 https://github.com/Perl/perl5/commit/a9c17edc99ee74c5e8337cbd9f226bc3c588c9c1 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.pm M cpan/Time-Piece/Piece.xs M cpan/Time-Piece/Seconds.pm M dist/Module-CoreList/lib/Module/CoreList.pm Log Message: ----------- Time::Piece: Add critical sections This calls various macros to make certain libc calls uninterruptible, so that they can be used safely in threaded applications, when this module is loaded with a perl that supports this. The macros are defined to do nothing if the perl doesn't contain working versions of them. In such perls, the macros are also defined to do nothing except on configurations that could have races. Typically, an extra problem is that the libc calls return in a global static buffer, subject to being overwritten by another thread. But an earlier commit defined PERL_REENTRANT, which makes those functions transparently return in a thread-local buffer instead. That doesn't help if the function gets interrupted by another thread; this commit completes the process. Commit: ebe6cf133d15b8bd49f0adb833271de6ed440ba1 https://github.com/Perl/perl5/commit/ebe6cf133d15b8bd49f0adb833271de6ed440ba1 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time::Piece strftime Commit: fcd459f8c43444f6402e829dc619d0d9f3eb1932 https://github.com/Perl/perl5/commit/fcd459f8c43444f6402e829dc619d0d9f3eb1932 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece: notes to myself Commit: 5d3a6ebcd7a4817cc7e34d4e14279e51304a8305 https://github.com/Perl/perl5/commit/5d3a6ebcd7a4817cc7e34d4e14279e51304a8305 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Slightly change wording of DEBUG messages This makes them more consistent with the other messages in this file. Commit: 8cf846a790b97510d6a1bc313403dada934ff67f https://github.com/Perl/perl5/commit/8cf846a790b97510d6a1bc313403dada934ff67f Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M util.c M win32/perlhost.h Log Message: ----------- XXX Win32 mem log Commit: ed117c218af3098d5380cd78815586faca2cd092 https://github.com/Perl/perl5/commit/ed117c218af3098d5380cd78815586faca2cd092 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M util.c Log Message: ----------- XXX util add thread to mem_log Commit: 738fbea26c163a8b05d1b1e3a7dba8cf3916967f https://github.com/Perl/perl5/commit/738fbea26c163a8b05d1b1e3a7dba8cf3916967f Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- Debug wrap wset Commit: 3ed9b899929b904ede48f9bed03e7ec0ca172e07 https://github.com/Perl/perl5/commit/3ed9b899929b904ede48f9bed03e7ec0ca172e07 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Change some -DLv statements to -DL These debug statements show something isn't quite normal, so shouldn't require a verbose option to be displayed Commit: 1db540d33e31cc9369788d35826aafb8afd68f73 https://github.com/Perl/perl5/commit/1db540d33e31cc9369788d35826aafb8afd68f73 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M pod/perlhacktips.pod Log Message: ----------- XXX incomplete perlhacktips: Commit: cd026f6e1fed3b88065030a4cd061b12873647cc https://github.com/Perl/perl5/commit/cd026f6e1fed3b88065030a4cd061b12873647cc Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M iperlsys.h Log Message: ----------- iperlsys.h: TODO need to look at adding mutexes Commit: 5cb3f80a882cf4f8454f6984079bf5d71d3aacf8 https://github.com/Perl/perl5/commit/5cb3f80a882cf4f8454f6984079bf5d71d3aacf8 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M regen/reentr.pl Log Message: ----------- reentr.pl: XXX about needing mutex Commit: 49b4ccfb2de92d4288d542cf20e868fa35bff8fb https://github.com/Perl/perl5/commit/49b4ccfb2de92d4288d542cf20e868fa35bff8fb Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod M t/porting/known_pod_issues.dat Log Message: ----------- perlxs Commit: fcc2261ce383daba93ea6f339065491b7a76afa2 https://github.com/Perl/perl5/commit/fcc2261ce383daba93ea6f339065491b7a76afa2 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M pp.c Log Message: ----------- Debug Windows memory usage in pp_study Commit: 6716a9e8d79aad6d9b6009a9fb6f600343a72197 https://github.com/Perl/perl5/commit/6716a9e8d79aad6d9b6009a9fb6f600343a72197 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M pod/perlmod.pod Log Message: ----------- perlmod Commit: 1cc8a226367f7a998878122ef38194539cdd54f7 https://github.com/Perl/perl5/commit/1cc8a226367f7a998878122ef38194539cdd54f7 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M pod/perllocale.pod Log Message: ----------- perllocale Xxx start of changes Commit: 3fc2013ba027a31be66cc9b6d643ee69be38d3f5 https://github.com/Perl/perl5/commit/3fc2013ba027a31be66cc9b6d643ee69be38d3f5 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M win32/config_H.gc M win32/config_h.PL M win32/config_sh.PL Log Message: ----------- XXX config Commit: d5c0ab8baa0e1c4b4c43f20a31a2a51f3cfca4d4 https://github.com/Perl/perl5/commit/d5c0ab8baa0e1c4b4c43f20a31a2a51f3cfca4d4 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M hints/openbsd.sh Log Message: ----------- openbsd Commit: 97aa2ec070ed3b978a369f5a4f3b22217f9f3409 https://github.com/Perl/perl5/commit/97aa2ec070ed3b978a369f5a4f3b22217f9f3409 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M t/run/locale.t Log Message: ----------- XXX t/run/locale.t Commit: cc1c3ecb42ecbef121fcad5c2126154b9797805c https://github.com/Perl/perl5/commit/cc1c3ecb42ecbef121fcad5c2126154b9797805c Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M pod/perlembed.pod Log Message: ----------- f perlembed Commit: 38b06e939d00481d349c4586f22239874ddc87af https://github.com/Perl/perl5/commit/38b06e939d00481d349c4586f22239874ddc87af Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- final commit Commit: aaddf6f7a7f346b6e89aa805a2b6d1e812e754e9 https://github.com/Perl/perl5/commit/aaddf6f7a7f346b6e89aa805a2b6d1e812e754e9 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Win32: We don't know the locale here And, so we don't know whether it is a UTF-8 locale or not. So use the proper enum value to indicate that. Commit: 05fe8aa7468f179dd76d3cf540f741797a199cf1 https://github.com/Perl/perl5/commit/05fe8aa7468f179dd76d3cf540f741797a199cf1 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M makedef.pl Log Message: ----------- XXX temp to try to get MingW to work Commit: 964bab7454a85344f273dcd055f22c3e9aa4fe50 https://github.com/Perl/perl5/commit/964bab7454a85344f273dcd055f22c3e9aa4fe50 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- l Commit: 0fbd6704ae2cc9e3c04caed8f7b3c8d089637c29 https://github.com/Perl/perl5/commit/0fbd6704ae2cc9e3c04caed8f7b3c8d089637c29 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- locale_threads: start of using platform locales Commit: ddb6eac5b5c25a4ee31b823253ede54efbd89a8e https://github.com/Perl/perl5/commit/ddb6eac5b5c25a4ee31b823253ede54efbd89a8e Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M lib/locale_threads.t Log Message: ----------- Revert "locale_threads: start of using platform locales" This reverts commit a7a8dea3aabb81a05aacaf3a26c49854a5854111. Commit: f3a816bd742cb7da2c110428bdf7ddc26eb06a04 https://github.com/Perl/perl5/commit/f3a816bd742cb7da2c110428bdf7ddc26eb06a04 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M embed.h M lib/locale_threads.t M locale.c M proto.h Log Message: ----------- l Commit: 4447794c8f047491ac7dc301dba1e0b27df474af https://github.com/Perl/perl5/commit/4447794c8f047491ac7dc301dba1e0b27df474af Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M embed.h M lib/locale_threads.t M locale.c M proto.h Log Message: ----------- Revert "l" This reverts commit ff3b15c3b8120dafad0a525f4d7afd9028463191. Commit: 42bdbb18330249b34e9a6bb480a510da936b0aa5 https://github.com/Perl/perl5/commit/42bdbb18330249b34e9a6bb480a510da936b0aa5 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify loop A slight restructuring saves some lines. Commit: 1c8ebe62384bb662baced44de5989220dd0875cc https://github.com/Perl/perl5/commit/1c8ebe62384bb662baced44de5989220dd0875cc Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale_table.h Log Message: ----------- Make LC_MONETARY and LC_NUMERIC indexes adjacent We have indexes we use for locale categories. The next commit will want these two to be in consecutive order, with LC_NUMERIC first. This commit just moves their definitions around. Commit: eb89238619d3f25f0eab485e9c2658668d54a29b https://github.com/Perl/perl5/commit/eb89238619d3f25f0eab485e9c2658668d54a29b Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Make a mask be 1, 2, or 3. This makes the two bits that ever get set in this mask to be positions 0 and 1. Commit: 2be5e649cc97da7969426c71f530f5a33da3d580 https://github.com/Perl/perl5/commit/2be5e649cc97da7969426c71f530f5a33da3d580 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M locale.c M proto.h Log Message: ----------- locale.c: Change U32 to less specific The previous commits have made this mask only ever use the lowest two bits; so even a U8 is sufficient. Commit: dfdbddbded68b2eea7e0090d70d92cf2fe9f0591 https://github.com/Perl/perl5/commit/dfdbddbded68b2eea7e0090d70d92cf2fe9f0591 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Simplify some localeconv() code The previous commits have allowed this code to determine by looking at the position of a bit in a mask what is going on, and so the code that used to be there to cope with not having that can be removed. Commit: 15bfe25cc378b196fe5bd0231702bf2b5e8048c7 https://github.com/Perl/perl5/commit/15bfe25cc378b196fe5bd0231702bf2b5e8048c7 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c Log Message: ----------- locale.c: Silence some compiler warnings Commit: b97e4994c72b8ce48864399b8b87e9f3cc6a22c9 https://github.com/Perl/perl5/commit/b97e4994c72b8ce48864399b8b87e9f3cc6a22c9 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M locale.c M locale_table.h M perl.c M sv.c M win32/GNUmakefile Log Message: ----------- foo Commit: 3af1c73ebc1b600de31ce4e471e03bd8c9381ab0 https://github.com/Perl/perl5/commit/3af1c73ebc1b600de31ce4e471e03bd8c9381ab0 Author: Karl Williamson <k...@cpan.org> Date: 2023-11-12 (Sun, 12 Nov 2023) Changed paths: M embed.fnc M embed.h M locale.c M makedef.pl M proto.h Log Message: ----------- bar Compare: https://github.com/Perl/perl5/compare/01c98f7adc4a...3af1c73ebc1b