Branch: refs/heads/smoke-me/khw-env
Home: https://github.com/Perl/perl5
Commit: 97bd10fb57ec53f2b530fa9e518855b030360038
https://github.com/Perl/perl5/commit/97bd10fb57ec53f2b530fa9e518855b030360038
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale.t
Log Message:
-----------
lib/locale.t:
Fixes #21697.
On some platforms, a locale name is specified in the code page (or
code set) that applies to it, rather than plain ASCII. Windows, and
hence MingW, is the prime example.
The locale name for a particular Turkish variety found in MingW is
"Turkish_T?????.1254" where the question marks represent different
characters that have meaning in the 1254 code page, but would look like
mojibake if I had reproduced their actual values here.
When doing a setlocale() here, if the current code page is incompatible
with the new one, it will fail; if compatible it will succeed.
On my box running MingW, locales are tried out by this test file in
alphabetical order, and the one before this Turkish happens to be Thai,
with a code page of 874. Apparently 1254 is not compatible with 874, so
switching directly from Thai to Turkish fails.
The solution is to switch into a neutral code page before switching into
one being trialed. "C" works in this case, and I suspect in all others.
Commit: 4a6082257fe61224954d5dc9aac8f127620fd1e7
https://github.com/Perl/perl5/commit/4a6082257fe61224954d5dc9aac8f127620fd1e7
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M charclass_invlists.h
M lib/unicore/Makefile
M lib/unicore/mktables
M lib/unicore/uni_keywords.pl
M regcharclass.h
M uni_keywords.h
Log Message:
-----------
mktables more verbose
Commit: bb7bdc6ac915d1d850e1317c3ad699c1adef2db4
https://github.com/Perl/perl5/commit/bb7bdc6ac915d1d850e1317c3ad699c1adef2db4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M cpan/Pod-Simple/lib/Pod/Simple/BlackBox.pm
Log Message:
-----------
BlackBox dont use rare scripts
Commit: f57e455d9c2b8cfddc50dfd5f6625f7f5268dd5a
https://github.com/Perl/perl5/commit/f57e455d9c2b8cfddc50dfd5f6625f7f5268dd5a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/harness
Log Message:
-----------
XXX t/harness temp tweaks
Commit: ee6529a392a68d980b2866ce7d6fad64d1cf04aa
https://github.com/Perl/perl5/commit/ee6529a392a68d980b2866ce7d6fad64d1cf04aa
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/harness
Log Message:
-----------
XXX skip croak.t under sanitizer
Commit: afb4ee1aa9c0550f1cf9a67e0050e40afd8a44f3
https://github.com/Perl/perl5/commit/afb4ee1aa9c0550f1cf9a67e0050e40afd8a44f3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/porting/bincompat.t
Log Message:
-----------
skip bincompat.t
Commit: 98bc22d4601bb7b6502286231b556e02154ba190
https://github.com/Perl/perl5/commit/98bc22d4601bb7b6502286231b556e02154ba190
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/TEST
Log Message:
-----------
Skip cpan testing message
Commit: 2ad45e5f746d6d5ed577e3d5abafaa05ba787ffd
https://github.com/Perl/perl5/commit/2ad45e5f746d6d5ed577e3d5abafaa05ba787ffd
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/TEST
Log Message:
-----------
Also skip non-thread dist testing
Commit: 4e174ff491474862136c09b0a8c25e7e3ae517a0
https://github.com/Perl/perl5/commit/4e174ff491474862136c09b0a8c25e7e3ae517a0
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M cpan/Archive-Tar/t/02_methods.t
Log Message:
-----------
XXX skip Archive-Tar because of symlinks
Commit: 61565ad41d8c28d1c9380f11b162ad448204bf5a
https://github.com/Perl/perl5/commit/61565ad41d8c28d1c9380f11b162ad448204bf5a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/porting/cmp_version.t
Log Message:
-----------
XXX skip cmp_version.t because of sym links
Commit: 243a210c254a34bb1c5256391008d3b4d1439061
https://github.com/Perl/perl5/commit/243a210c254a34bb1c5256391008d3b4d1439061
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 2a4191d171ec7bb7b4df51ebcac30396f32d6979
https://github.com/Perl/perl5/commit/2a4191d171ec7bb7b4df51ebcac30396f32d6979
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M dist/Tie-File/t/29a_upcopy.t
Log Message:
-----------
up timeout for dist/Tie-File/t/29a_upcopy.t
Commit: f080eddab4659bc4b9c501c12f50a91e3a490ca7
https://github.com/Perl/perl5/commit/f080eddab4659bc4b9c501c12f50a91e3a490ca7
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 4f1350f74a24d986744f06d7eaccb343f5ddeb09
https://github.com/Perl/perl5/commit/4f1350f74a24d986744f06d7eaccb343f5ddeb09
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/run/locale.t
Log Message:
-----------
run/locale.t: more debug
Commit: 11d7a4b38b7851b8640b1cbd484f984d13b92da0
https://github.com/Perl/perl5/commit/11d7a4b38b7851b8640b1cbd484f984d13b92da0
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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:
-----------
Make 24 uniprops.t tests
Commit: 59b4c24bee2fbcb42ab849b3677996c03a21ee50
https://github.com/Perl/perl5/commit/59b4c24bee2fbcb42ab849b3677996c03a21ee50
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
XXX temp to test broken lconv on non-Windows
Commit: 0dcb841b144985c8842b668b8792305d64056c4a
https://github.com/Perl/perl5/commit/0dcb841b144985c8842b668b8792305d64056c4a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/run/locale.t
Log Message:
-----------
XXX run/locale.t: maybe f move test
Commit: f0ade6ab1aad6468a8a577c9eb04fb870c5aec18
https://github.com/Perl/perl5/commit/f0ade6ab1aad6468a8a577c9eb04fb870c5aec18
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 73575e4afd0703aa93e4d9139507c5b7147b3d2b
https://github.com/Perl/perl5/commit/73575e4afd0703aa93e4d9139507c5b7147b3d2b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/porting/cmp_version.t
Log Message:
-----------
XXX skip cmp_version.t prob. due to 5.38 tag issue
Commit: 6b6669090428ce7ef5778e54b2a5541afa10dec3
https://github.com/Perl/perl5/commit/6b6669090428ce7ef5778e54b2a5541afa10dec3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 52d8932909482250e8d33a6da0e3d7951a989c2e
https://github.com/Perl/perl5/commit/52d8932909482250e8d33a6da0e3d7951a989c2e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M makedef.pl
M perl.h
Log Message:
-----------
XXX temporary: Allow undef LC_ALL
Commit: bb754b114c122b8bdc2e12a3613da5545ffa99e9
https://github.com/Perl/perl5/commit/bb754b114c122b8bdc2e12a3613da5545ffa99e9
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
perl.h: Fake up win32 compile a bit
Commit: eeac883bde6742c2fa36e06bea9eab50037e535b
https://github.com/Perl/perl5/commit/eeac883bde6742c2fa36e06bea9eab50037e535b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 56801e3414a14dc010388667d0836c2539cfb954
https://github.com/Perl/perl5/commit/56801e3414a14dc010388667d0836c2539cfb954
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 2504d7ccacd80be80b8d6859656d3dcdcaf839d3
https://github.com/Perl/perl5/commit/2504d7ccacd80be80b8d6859656d3dcdcaf839d3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 27acca60adda1433f26ad3a6eca5f53e2304d507
https://github.com/Perl/perl5/commit/27acca60adda1433f26ad3a6eca5f53e2304d507
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: ce3fe725e5944560f162e78185bff2bae7d414a3
https://github.com/Perl/perl5/commit/ce3fe725e5944560f162e78185bff2bae7d414a3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M proto.h
M util.c
Log Message:
-----------
XXX memlog
Commit: 1d2a6ab41e4f0239f288a184f70360aa5bac42f1
https://github.com/Perl/perl5/commit/1d2a6ab41e4f0239f288a184f70360aa5bac42f1
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
M t/run/switchDx.t
Log Message:
-----------
debug thread
Commit: 37b9c3c5f9adbf0d4cf1ebc4bb15fd7c18169c6f
https://github.com/Perl/perl5/commit/37b9c3c5f9adbf0d4cf1ebc4bb15fd7c18169c6f
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M dist/threads/threads.xs
Log Message:
-----------
threads.xs DEBUG_U
Commit: dc9b7901fe053f5d4bcc09f9e1c9ba66a497ce4d
https://github.com/Perl/perl5/commit/dc9b7901fe053f5d4bcc09f9e1c9ba66a497ce4d
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale.t
Log Message:
-----------
XXX temp: lib/locale.t: debug
Commit: ff3274fe2a09d966c2c5b9941713419aa4c3e842
https://github.com/Perl/perl5/commit/ff3274fe2a09d966c2c5b9941713419aa4c3e842
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale.t
Log Message:
-----------
lib/locale.t FILE debug
Commit: 15f962b543062d5d4c04eace70ef6fc736b44dfa
https://github.com/Perl/perl5/commit/15f962b543062d5d4c04eace70ef6fc736b44dfa
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale.t
Log Message:
-----------
lib/locale.t
Commit: ad2509f6e9d6b8a82a44af52f2d8d52a7bff3e96
https://github.com/Perl/perl5/commit/ad2509f6e9d6b8a82a44af52f2d8d52a7bff3e96
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
XXX perl.h: Debugging mutex lock'
Commit: 3608df5a1d30f87fb8c6e4ddadc01b8a69e49516
https://github.com/Perl/perl5/commit/3608df5a1d30f87fb8c6e4ddadc01b8a69e49516
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: b1445fdbfc6fd131e994788608f174bdec80517c
https://github.com/Perl/perl5/commit/b1445fdbfc6fd131e994788608f174bdec80517c
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M cpan/version/t/07locale.t
Log Message:
-----------
cpan/version/07locale.t: drop, bug have to recompute md5
Commit: debed5acf201a08edea99bc25d688856c8cf1fa4
https://github.com/Perl/perl5/commit/debed5acf201a08edea99bc25d688856c8cf1fa4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/porting/customized.dat
Log Message:
-----------
customized.dat
Commit: b6bdd4efafad84c2c8d2c2f3be7bccee517793f8
https://github.com/Perl/perl5/commit/b6bdd4efafad84c2c8d2c2f3be7bccee517793f8
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 9a2b5d782626d1d28848ea440f1c062140e9105e
https://github.com/Perl/perl5/commit/9a2b5d782626d1d28848ea440f1c062140e9105e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
loc_tools: XXX Debug
Commit: c3a1f70af1b8664e872d83de07c8eaad645246cb
https://github.com/Perl/perl5/commit/c3a1f70af1b8664e872d83de07c8eaad645246cb
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
S_querylocale_2008_i: Add entry assertion
Commit: 3da21f70017e9063f971c0353e19496e21f12e11
https://github.com/Perl/perl5/commit/3da21f70017e9063f971c0353e19496e21f12e11
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
S_bool_setlocale_i: Add entry assertion
Commit: 92ae2c04101fe9ff43b924b80e305664b65f9a72
https://github.com/Perl/perl5/commit/92ae2c04101fe9ff43b924b80e305664b65f9a72
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
savepv if threaded, unused I think
Commit: bb984bf3a44473b492a7d4d0ae4ea591a9bf5aa8
https://github.com/Perl/perl5/commit/bb984bf3a44473b492a7d4d0ae4ea591a9bf5aa8
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M hints/darwin.sh
Log Message:
-----------
darwin hints querylocale race in earlier darwins?
Commit: bd142dde49f4072dbe0be4c4e25f7b72f0d6672d
https://github.com/Perl/perl5/commit/bd142dde49f4072dbe0be4c4e25f7b72f0d6672d
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pp.c
Log Message:
-----------
pp_study: Add memory use debugging
Commit: a5c7a507b1ba368441ec08373be265b01c1b4c28
https://github.com/Perl/perl5/commit/a5c7a507b1ba368441ec08373be265b01c1b4c28
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pp.c
Log Message:
-----------
Revert "pp_study: Add memory use debugging"
Commit: 26282fc990102b1ee849d98920dc07b58ef4dd1e
https://github.com/Perl/perl5/commit/26282fc990102b1ee849d98920dc07b58ef4dd1e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M hints/darwin.sh
Log Message:
-----------
darwin
Commit: c1cf71521c1e4589735b6e992a8fd3ca5aafa772
https://github.com/Perl/perl5/commit/c1cf71521c1e4589735b6e992a8fd3ca5aafa772
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: ebbc546df2bdff18d46f3a50ab71546eae58894f
https://github.com/Perl/perl5/commit/ebbc546df2bdff18d46f3a50ab71546eae58894f
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/run/locale.t
Log Message:
-----------
t/run/locale.t: debug
Commit: 7aca68b1a932157d20800e686c0cb76f73c89f7e
https://github.com/Perl/perl5/commit/7aca68b1a932157d20800e686c0cb76f73c89f7e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
locale_threads: add a commented out yield
Commit: 80f42ceab9fc670a8eb0b837cdbe0f0efa1cee4b
https://github.com/Perl/perl5/commit/80f42ceab9fc670a8eb0b837cdbe0f0efa1cee4b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
locale_threads: debugging
Commit: 98e2b37577cffe1967041e728174876869192667
https://github.com/Perl/perl5/commit/98e2b37577cffe1967041e728174876869192667
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: c9ae493db9a753f06e8864ad0df5feecf19a664a
https://github.com/Perl/perl5/commit/c9ae493db9a753f06e8864ad0df5feecf19a664a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 3e96d9170524c9f7dec85859809b22e53c43bafd
https://github.com/Perl/perl5/commit/3e96d9170524c9f7dec85859809b22e53c43bafd
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 60dac67fe4ede9b64beafde616c1d4b09ffba98f
https://github.com/Perl/perl5/commit/60dac67fe4ede9b64beafde616c1d4b09ffba98f
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M thread.h
Log Message:
-----------
thread.h: White space only
Indent some nested preproccessor defines
Commit: 97f2e2a581cdd8131e616d4d67774c4f4a2c1c6f
https://github.com/Perl/perl5/commit/97f2e2a581cdd8131e616d4d67774c4f4a2c1c6f
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: 0e626632b89d32d51c72380c192f3a70319810ec
https://github.com/Perl/perl5/commit/0e626632b89d32d51c72380c192f3a70319810ec
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M cpan/Time-Piece/Piece.xs
Log Message:
-----------
XXX Time::Piece strftime
Commit: 87741c503701c9abf23379296525dca24137f5b4
https://github.com/Perl/perl5/commit/87741c503701c9abf23379296525dca24137f5b4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M cpan/Time-Piece/Piece.xs
Log Message:
-----------
Time-Piece: notes to myself
Commit: 31d9b456bc908f431db17e0f9f26fb7ea8947b90
https://github.com/Perl/perl5/commit/31d9b456bc908f431db17e0f9f26fb7ea8947b90
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M util.c
M win32/perlhost.h
Log Message:
-----------
XXX Win32 mem log
Commit: 4c2ff4a2828539752a211f1b149bb0fc9259a77d
https://github.com/Perl/perl5/commit/4c2ff4a2828539752a211f1b149bb0fc9259a77d
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M util.c
Log Message:
-----------
XXX util add thread to mem_log
Commit: ece50f4b40d2e48734a61c200f308b5c6db98a45
https://github.com/Perl/perl5/commit/ece50f4b40d2e48734a61c200f308b5c6db98a45
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Debug wrap wset
Commit: e53861a4ad2dfcd38c77f3906c8b18a80730e3d4
https://github.com/Perl/perl5/commit/e53861a4ad2dfcd38c77f3906c8b18a80730e3d4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pod/perlhacktips.pod
Log Message:
-----------
XXX incomplete perlhacktips:
Commit: 7f216068bc2ecd8737a8bcc464475fd9355a0f28
https://github.com/Perl/perl5/commit/7f216068bc2ecd8737a8bcc464475fd9355a0f28
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M iperlsys.h
Log Message:
-----------
iperlsys.h: TODO need to look at adding mutexes
Commit: 78eadcf4094f0d367df6ba67fea852d77a0beb2a
https://github.com/Perl/perl5/commit/78eadcf4094f0d367df6ba67fea852d77a0beb2a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M regen/reentr.pl
Log Message:
-----------
reentr.pl: XXX about needing mutex
Commit: 4bac808fd76bd2b3a282cc09490f6363553d24e4
https://github.com/Perl/perl5/commit/4bac808fd76bd2b3a282cc09490f6363553d24e4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M dist/ExtUtils-ParseXS/lib/perlxs.pod
M pod/perlembed.pod
M pod/perlhacktips.pod
M pod/perllocale.pod
M t/porting/known_pod_issues.dat
Log Message:
-----------
perlxs
Commit: 052cb055f06c1273341607dd2868ab93f8e9ceda
https://github.com/Perl/perl5/commit/052cb055f06c1273341607dd2868ab93f8e9ceda
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pod/perlmod.pod
Log Message:
-----------
perlmod
Commit: 4812b15983a46a97a996c4c8aabe048b70aaa72f
https://github.com/Perl/perl5/commit/4812b15983a46a97a996c4c8aabe048b70aaa72f
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pod/perllocale.pod
Log Message:
-----------
perllocale Xxx start of changes
Commit: 62d1b12e3bb5eb8284e78dbff2a463beb8b17488
https://github.com/Perl/perl5/commit/62d1b12e3bb5eb8284e78dbff2a463beb8b17488
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M win32/config_H.gc
M win32/config_h.PL
M win32/config_sh.PL
Log Message:
-----------
XXX config
Commit: fa624eff327bb9ed41b8c87bbc8834fd7c6459c4
https://github.com/Perl/perl5/commit/fa624eff327bb9ed41b8c87bbc8834fd7c6459c4
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/run/locale.t
Log Message:
-----------
XXX t/run/locale.t
Commit: 1689ddbaae1c17cb04dc94ff6ada1b05a9ca60a8
https://github.com/Perl/perl5/commit/1689ddbaae1c17cb04dc94ff6ada1b05a9ca60a8
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pod/perlembed.pod
Log Message:
-----------
f perlembed
Commit: d19276d20a55dd2b8b293c2b85937d151cbb176d
https://github.com/Perl/perl5/commit/d19276d20a55dd2b8b293c2b85937d151cbb176d
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M intrpvar.h
M locale.c
M perl.h
Log Message:
-----------
Fixup FAKE_MINGW
This is used (by me) to partially emulate MingW on a *nix platform. It
was passing all its tests, but I discovered that I had the wrong #if
which was hence not enabling crucial parts of the emulation.
Commit: 9e35d7fe6adab6957df0ae671b31c239f2647b07
https://github.com/Perl/perl5/commit/9e35d7fe6adab6957df0ae671b31c239f2647b07
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
locale_threads: start of using platform locales
Commit: a42e90f4b86a191211e8ee45529072e48b06c97b
https://github.com/Perl/perl5/commit/a42e90f4b86a191211e8ee45529072e48b06c97b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
Revert "locale_threads: start of using platform locales"
This reverts commit a7a8dea3aabb81a05aacaf3a26c49854a5854111.
Commit: 0bc3887ffb8f20eb00f1bb91c3ea3d647b76e125
https://github.com/Perl/perl5/commit/0bc3887ffb8f20eb00f1bb91c3ea3d647b76e125
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
M perl.c
M sv.c
Log Message:
-----------
define numeric values to be C when no USE_NUMERIC
Commit: 1458f89af1d4615d5414c7e9443cacc0cf3dcab1
https://github.com/Perl/perl5/commit/1458f89af1d4615d5414c7e9443cacc0cf3dcab1
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
M perl.c
M sv.c
Log Message:
-----------
Revert "define numeric values to be C when no USE_NUMERIC"
This reverts commit 9bb7ff6531bf9e28d635a71e6d55c752a995da2d.
Commit: b034e154367f775af7a5916e00cd13e92496ea1e
https://github.com/Perl/perl5/commit/b034e154367f775af7a5916e00cd13e92496ea1e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add #define to separate label from declaration
This is designed to be mostly self-documenting.
Commit: 10fd5087f7508956903ae9f77d7456b875c8dc8b
https://github.com/Perl/perl5/commit/10fd5087f7508956903ae9f77d7456b875c8dc8b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
rulereeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
Commit: 6c8b98fc4f0ba9f25eaea80702fedf24ffcf718e
https://github.com/Perl/perl5/commit/6c8b98fc4f0ba9f25eaea80702fedf24ffcf718e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Silence compiler warning
This tightens when this function is compiled to the actual
Configurations it is needed in.
Commit: 7b3afdbf246da6264237f1363dd84bdc90cc29ad
https://github.com/Perl/perl5/commit/7b3afdbf246da6264237f1363dd84bdc90cc29ad
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
C_thous better ifdef
Commit: c1063710d0caf72c0fcc4b3f30982d8d71cd84df
https://github.com/Perl/perl5/commit/c1063710d0caf72c0fcc4b3f30982d8d71cd84df
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M ext/POSIX/t/posix.t
M ext/POSIX/t/time.t
M ext/XS-APItest/t/locale.t
M lib/locale.t
M lib/locale_threads.t
Log Message:
-----------
skip tests if no strftime
Commit: 8f6abbbd24cc417bdc70c2e4e5b599486b0a44a6
https://github.com/Perl/perl5/commit/8f6abbbd24cc417bdc70c2e4e5b599486b0a44a6
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M t/loc_tools.pl
Log Message:
-----------
loctools use if dumper
Commit: f616d728ee1d9292b76ef22bcf892a38a1c2c0c3
https://github.com/Perl/perl5/commit/f616d728ee1d9292b76ef22bcf892a38a1c2c0c3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale.t
Log Message:
-----------
XXX lib/locale.t dont scan for LC_NUMERIC
Commit: 06c943a29e331d767b2c150d95a6f30d0bb51979
https://github.com/Perl/perl5/commit/06c943a29e331d767b2c150d95a6f30d0bb51979
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M ext/POSIX/lib/POSIX.pod
Log Message:
-----------
start of pod for localeconv
Commit: c27ed1bf3755590bb1260ddf5bc1200ebc1cec32
https://github.com/Perl/perl5/commit/c27ed1bf3755590bb1260ddf5bc1200ebc1cec32
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Add struct definition as a fallback
If we ever encountered a platform that didn't have localeconv(), nor its
structure definition, this could be used to get things to work.
Commit: eda7265fd3e36376574ac20481a3a79771885a0e
https://github.com/Perl/perl5/commit/eda7265fd3e36376574ac20481a3a79771885a0e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
debug populate localeconv
Commit: 975f026e4f4790cc1b160ff1eaecb6216a813fdf
https://github.com/Perl/perl5/commit/975f026e4f4790cc1b160ff1eaecb6216a813fdf
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M dist/threads/threads.xs
Log Message:
-----------
debug thread xs
Commit: 66d322659a689c6ac39e6a539fae86f2693d19cb
https://github.com/Perl/perl5/commit/66d322659a689c6ac39e6a539fae86f2693d19cb
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
lib/locale_threads.t: Change variable names
Using 'set' as opposed to 'group' is clearer.
Commit: 81eb2f62526fe14f9ebd08a8243fc59cc94793d8
https://github.com/Perl/perl5/commit/81eb2f62526fe14f9ebd08a8243fc59cc94793d8
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
lib/locale_threads.t: Add debugging info
Commit: e62b5bb25c1801ce68e67234809f974ad944ce28
https://github.com/Perl/perl5/commit/e62b5bb25c1801ce68e67234809f974ad944ce28
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M proto.h
Log Message:
-----------
locale.c: Don't compile unused function
Since 0b52bb633d8c55bb15f05cdb19a4b7cb071ea271, this function isn't used
unless localeconv() is available. Don't compile it unless that is true.
Commit: 6c42c7ddc0f48b092d0566c8bc868bbfc5ffbe29
https://github.com/Perl/perl5/commit/6c42c7ddc0f48b092d0566c8bc868bbfc5ffbe29
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M proto.h
M sv.c
Log Message:
-----------
Add newSVpvz() to create a sized SvPV.
There's no current trivial method to create a non-zero length SV that
will hold a PV.
Commit: dc2cbaf1ceaabd7034b6d4caaa88a868f9444d2a
https://github.com/Perl/perl5/commit/dc2cbaf1ceaabd7034b6d4caaa88a868f9444d2a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Call newSVpvz()
Commit: 803dfe5b00201dc349018071220ad7ffec185f97
https://github.com/Perl/perl5/commit/803dfe5b00201dc349018071220ad7ffec185f97
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Each toggle locale must have matching restore
The next commit will want this symmetry, which until now hasn't
mattered.
Commit: debf182252e358cc056f0c3cbe4fdefe559afc9e
https://github.com/Perl/perl5/commit/debf182252e358cc056f0c3cbe4fdefe559afc9e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Use a critical section when locale is toggled
Sometimes the locale for a category has to be toggled to some other
locale, when the desired value is for a locale that isn't the current
one.
This doesn't present any problem when locales are thread-safe. The
locale gets toggled back before any other work is done.
But when locales are not thread-safe and we have threads, another thread
can execute in the now-wrong locale. Perl, for a few releases now,
tries to mitigate the issues with running locales under threads when
yhread-safe locales are not in use, for mitigations that are easy to do.
These very well may make things work for applications that don't change
locales very much; say only on startup.
But now perl itself changes locales briefly behind an application's
back. It turns out it is easy to add a lock that will keep threads that
otherwise would work to continue to work.
That's what this commit does, by adding TOGGLE_LOCK and TOGGLE_UNLOCK
macros that are no-ops for all but the unsafe-threaded locale
implementation.
The unused parameter to the macros is for future use.
Commit: 2835181d5a38649305af72f8efb498de6962555a
https://github.com/Perl/perl5/commit/2835181d5a38649305af72f8efb498de6962555a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Move unnecessary work out of toggled state
In some Configurations, toggling the locale can interfere with other
executing threads. As of GH #21908, the current Configurations where
this is true are critical sections. This commit takes one such place
and moves unnecessary work to outside the critical section/toggled
locale.
The downside of this change is that we may have to retoggle to the
locale later in the called function get_locale_string_utf8ness_i(),
which may call is_locale_utf8(). This would be wasted effort in those
Configurations where toggling doesn't interfere, but often the toggling
is avoided, in part because of caching, and in part because the most
frequent calls to this function result in ASCII data which don't require
toggling.
A scheme could be created to avoid any such possibility, but I don't
think it's worth it.
Commit: cab4e6608a2533a9c393d85a2320062d8f943447
https://github.com/Perl/perl5/commit/cab4e6608a2533a9c393d85a2320062d8f943447
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Swap the order of two functions
The new ordering will make the diffs less in the next commit, and will
make just as much sense going forward as the previous ordering.
Commit: 8463b13361c1d430fbed1072f16af1d201b7ba96
https://github.com/Perl/perl5/commit/8463b13361c1d430fbed1072f16af1d201b7ba96
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
locale.c: Pass locale to strftime functions
This will allow a future commit to reduce the amount of time spent in a
critical section.
It requires the least duplication of code for this commit to create a
new function sv_strftime_common() which takes over the bulk of the code
from sv_strftime_tm(), which becomes just a small wrapper. The new
function adds a 'locale' parameter, and the other functions that now
need to know the locale get it, and then call this new function.
Commit: 85b52efa5998fce6990e14d5c3bdd76abfe0be82
https://github.com/Perl/perl5/commit/85b52efa5998fce6990e14d5c3bdd76abfe0be82
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Shorten critical section times
Toggling a category's locale has a cost, so if there are a bunch of
operations that are going to be done in a row in a particular toggled
state, it makes sense to toggle once, do them all, then toggle back.
Most of the toggling in this file is short term, but there are a few
places where it is advantageous to toggle once.
But on some Configurations, toggling creates a critical, uninterruptible
section. For these, keeping the amount of time spent in such a state
without letting other threads execute needs to be as short as feasible,
and this outweighs the cost of toggling and retoggling.
This commit balances these competing needs by creating new macros for
those cases where we want to have an overarching toggle. Those macros
become no-ops when the toggling creates an uninterruptible section.
Thus, when there is a cost to remaining toggled for longer periods,
those macros don't do anything, and the macros that are at the point of
the actual need are the ones that do the toggling/retoggling. In the
Configurations where there isn't such a cost, the overarching macros
kick in, and the shorter-term ones find that the state is already
toggled, and they return without doing anything.
Commit: 587d30a6e386bdff0f067f2563454a60e60d8026
https://github.com/Perl/perl5/commit/587d30a6e386bdff0f067f2563454a60e60d8026
Author: Lukas Mai <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: use type-agnostic code for storing tm_zone
On some platforms, struct tm has a tm_zone member, but its type is not
consistent:
- Linux: const char *tm_zone;
- FreeBSD (& probably other BSDs): char *tm_zone;
In order to save/restore tm_zone, we can't just use a "const char *" or
"char *" variable because different parts of this code would always be a
const violation on one platform or the other.
Workaround: Use the tm_zone member of a full struct tm, which has the
right type no matter the platform.
Fixes #21948.
Commit: 092f111ae12b126e384ca36d2db9b4799504dc99
https://github.com/Perl/perl5/commit/092f111ae12b126e384ca36d2db9b4799504dc99
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
Add DEBUG_SETLOCALE_INCONSISTENCIES
Commit: b9501e0417a4366288fe317153ba8d90a7230dd9
https://github.com/Perl/perl5/commit/b9501e0417a4366288fe317153ba8d90a7230dd9
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
Enable DEBUG_SETLOCALE_INCONSISTENCIES
Commit: 53aa0241b888b75ee81c9f0eaed998c5bdd059d3
https://github.com/Perl/perl5/commit/53aa0241b888b75ee81c9f0eaed998c5bdd059d3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Make numeric standard inconsistent
Commit: d781a3eea7240ba712cf4abf9ed8352aef89001e
https://github.com/Perl/perl5/commit/d781a3eea7240ba712cf4abf9ed8352aef89001e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
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: e3a1df80aeef7e0ead62b4837eba4c5447d0907e
https://github.com/Perl/perl5/commit/e3a1df80aeef7e0ead62b4837eba4c5447d0907e
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
DEBUG Lv to U
Commit: 6d1fe0fb873a68aaebec880802015053d6526718
https://github.com/Perl/perl5/commit/6d1fe0fb873a68aaebec880802015053d6526718
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
extra debug
Commit: 562d6e6da47df5e4f0b62714f3c23d92c42b0241
https://github.com/Perl/perl5/commit/562d6e6da47df5e4f0b62714f3c23d92c42b0241
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
f some emul old implement
Commit: 4f8effedf894aa71a772f1044e88ae3d3b305da3
https://github.com/Perl/perl5/commit/4f8effedf894aa71a772f1044e88ae3d3b305da3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
more emul locks
Commit: 04436385f9f03b8b98ae20462d2d04c03f86119c
https://github.com/Perl/perl5/commit/04436385f9f03b8b98ae20462d2d04c03f86119c
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Revert "more emul locks"
This reverts commit 4733a1674423ee47b33eb0ee1882e1bf39faa1a6.
Commit: 60a322c964cf2565e3c6d6e9bd956340433c8fc3
https://github.com/Perl/perl5/commit/60a322c964cf2565e3c6d6e9bd956340433c8fc3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
langinfo lock
Commit: caa9a40207261850e3836afc709f19e923c12f2c
https://github.com/Perl/perl5/commit/caa9a40207261850e3836afc709f19e923c12f2c
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Revert "langinfo lock"
This reverts commit acaff35d7ed83830fb36c149aafede5cdf400061.
Commit: b6547d0d9b4f61353d07d3f4a0adcd60f74c5709
https://github.com/Perl/perl5/commit/b6547d0d9b4f61353d07d3f4a0adcd60f74c5709
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
lock mask
Commit: f2e2e339d2201ca9f9fa5275f314ab9c0578e405
https://github.com/Perl/perl5/commit/f2e2e339d2201ca9f9fa5275f314ab9c0578e405
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Revert "lock mask"
This reverts commit 3fd528c9d5d5b9c05dc1c697e61570b81811fb95.
Commit: 1374627d03ee6c5b1c54d50cbdeb9d957ca3b766
https://github.com/Perl/perl5/commit/1374627d03ee6c5b1c54d50cbdeb9d957ca3b766
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Maybe comment'
Commit: ac6f7cf6a099a3005ecd0f8af655f00cdc1ede88
https://github.com/Perl/perl5/commit/ac6f7cf6a099a3005ecd0f8af655f00cdc1ede88
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
emul assertion
Commit: 0522a75b96e6702da1ba90fa7f1c4652ea1b9eac
https://github.com/Perl/perl5/commit/0522a75b96e6702da1ba90fa7f1c4652ea1b9eac
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
M makedef.pl
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: 66a68a3911c12df84eda68fac9e3a1972dd21b86
https://github.com/Perl/perl5/commit/66a68a3911c12df84eda68fac9e3a1972dd21b86
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M makedef.pl
M perl.h
Log Message:
-----------
Don't do thread-safe locales emulation on mingw
MingW when compiled with the Universal C runtime (UCRT) is thread-safe
with respect to locales, just as VS 2015 and later MSVCRT compilations
are.
However, versions not using UCRT cannot be compiled to emulate
thread-safe locale. I'm pretty sure this is due to a bug in the libc
strftime() function, having spent a bunch of hours working on this.
It often fails lib/locale_threads.t when using the emulation, but not
always. The failure is always in strftime().
What made me think it could be perl is another characteristic of the
failures. lib/locale_threads.t works by, in each thread, setting each
available locale category to a locale, different from any other category
in that thread, and as different as possible from the locale for the
corresponding category in any other thread. For example thread 0 might
have LC_CTYPE set to locale X, LC_NUMERIC to Y, LC_TIME to Z, etc.
Thread 1 would use a locale for LC_CTYPE, as different from X as
possible, meaning executing the same operation on thread 0 and thread 1
would yield different expected results. (It goes to some lengths to
calculate the biggest distance in the results.) Similarly LC_NUMERIC
would have something almost completely different from Y; and so on.
Then each thread executes a batch of iterations. Each iteration runs
all the operations I could find that perl uses that apply to LC_TYPE,
and all the ones that apply to each of the other categories. And
verifies that all the results are as expected.
Simultaneously, the other threads are executing their batch. It is
verifying that there is no bleed-through from one thread to another. If
the threads all have the same results as the other threads, we couldn't
detect if there is real bleed-through or not. This is solved by making
the results for each category as different as possible from any other
thread currently executing.
However, this isn't good enough. Every so many iterations, each thread
changes to use a new set of locales. This verifies that the locales can
be changed in a thread without that bleeding through to other threads.
And thread 0 is special. It harvests the other threads as they finish,
and keeps going for a while. This is to catch bugs in thread
completion, of which we've had a few.
MingW's failures all occur, when they occur, on the first iteration
following a switch to a new set of locales. That is suspiciously like
it is a race condition in cleaning up from the previous setting. But it
isn't the first test of the set of the first iteration of the next set.
It can be the 10th or so test. I added enough debugging statements to
convince me that it isn't perl.
This is the failing code in locale.c:
STRFTIME_LOCK;
int len = strftime(buf, bufsize, fmt, mytm);
STRFTIME_UNLOCK;
The returned 'buf' is not always correct.
T
The LOCK/UNLOCK macros on MingW with thread-safe emulation enabled, call
EnterCriticalSection(), and set the locales for the categories that
affect strftime() to the proper locale. Just to be sure. I tested
setting LC_ALL to the correct value. While in its uninterruptible (by
other locale handling code anyway) section, strftime() fills buf with
the result for the current locale (which STRFTIME_LOCK has set).
I added print statements within the critical section thusly
STRFTIME_LOCK;
DEBUG_U(PerlIO_printf(Perl_debug_log,
"calling strftime(%s), LC_ALL=%s\n",
fmt, setlocale(LC_ALL, NULL)));
int len = strftime(buf, bufsize, fmt, mytm);
DEBUG_U(PerlIO_printf(Perl_debug_log,
"return=%s, LC_ALL=%s\n",
buf, setlocale(LC_ALL, NULL)));
STRFTIME_UNLOCK;
On this platform, setlocale() expands to _wsetlocale(), a Windows libc
call.
Here's what they showed for one failure.
calling strftime(%b), LC_ALL=Hungarian_Hungary.1250
return=marc., LC_ALL=Hungarian_Hungary.1250
The 'a' in the Hungarian for March is supposed to be a U+00E1, with an
acute accent, so this is wrong.
strftime() also is passed a pointer to a struct tm, which is filled in
with various integers which indicate in this case which month the %b is
supposed to return. That it is returning something very much like márch
indicates those integers are correct.
Not shown in the example above are the other prints I added to verify
that we are indeed in a critical section. I didn't see a way to
actually test for this via a libc call, but one could use strace and
wade through the output. But there are print statements that print out
immediately before entering a critical section, and immediately after
leaving it. I verified that those prints indicate this code is in a
critical section.
I note that this box has actually not very many locales, so that the
distance between the results of various threads isn't all that large.
Pretty much all the locales are CP 1250, 1251, 1252, and 1257, and no
UTF-8 ones, so all locales are single byte. None of them map \XE1 into
plain 'a', which is what we are seeing returned, so the cleanup theory
seems wrong. Sometimes the return is '?' or a series of them,
indicating that the returned character is mojibake.
None of the locales I saw had 'marc\.' as a possible return. It appears
only here in the entire trace of all threads. This makes it again less
likely that it is a cleanup issue. But where did it come from?. I
don't know. The value for the C locale is 'Mar', so it didn't come from
there.
The localeconv() function is also broken in this Configuration. We long
ago figured out a workaround for that. I tried that same workaround for
strftime(), and it didn't help.
Commit: 6b84b3801fb61d4a1ef99daf63115d68216452f2
https://github.com/Perl/perl5/commit/6b84b3801fb61d4a1ef99daf63115d68216452f2
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M makedef.pl
M perl.h
Log Message:
-----------
Revert "Don't do thread-safe locales emulation on mingw"
This reverts commit 4e4dfa1146e1f389110d001587ccb0fadec4323b.
Commit: b96f92f1656fb5856e4b85607ecda814773a2063
https://github.com/Perl/perl5/commit/b96f92f1656fb5856e4b85607ecda814773a2063
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
XXX perl.h maybe drop
Commit: 1addb5f671eacb5c359993dbf9ccad8aef0866d5
https://github.com/Perl/perl5/commit/1addb5f671eacb5c359993dbf9ccad8aef0866d5
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M makedef.pl
Log Message:
-----------
makedef.pl: PL_cur_locale_obj is only POSIX 2008 multiplicity
Commit: 607951f5bec1c67434618540e6770d64ad0d35a2
https://github.com/Perl/perl5/commit/607951f5bec1c67434618540e6770d64ad0d35a2
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
locale_threads.t: Better handle weird locales
The previous code was generating bunches of uninitialized variable
warnings, due to 1) not checking for definedness early; 2) the loop
termination needs to be reevaluated each time because there is a
potential splice, shortening the array.
This only happens, I believe, on MingW not using UCRT.
Commit: e3051c97990097eea24fdcd30b440c85097ba2cf
https://github.com/Perl/perl5/commit/e3051c97990097eea24fdcd30b440c85097ba2cf
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M lib/locale_threads.t
Log Message:
-----------
Revert "locale_threads.t: Skip on OpenBSD and DragonFly threaded builds"
This reverts commit 1d74e8214dd53cf0fa9e8c5aab3e6187685eadcd, as they
have been modified
Commit: f784324e266cce26d3b35ce1dfef639b8f9fd442
https://github.com/Perl/perl5/commit/f784324e266cce26d3b35ce1dfef639b8f9fd442
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
Debug uselocale
Commit: 75d45f247d51a69a85fc78238c84acad38963a1a
https://github.com/Perl/perl5/commit/75d45f247d51a69a85fc78238c84acad38963a1a
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M pp.c
Log Message:
-----------
pp_study: hook
Commit: 57a07e8003cfd3e85721e312554bb2c9f84f0308
https://github.com/Perl/perl5/commit/57a07e8003cfd3e85721e312554bb2c9f84f0308
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M sv.c
Log Message:
-----------
sv.c need to check for pv in sv in sv_setpvf
Commit: 29f3baf9ce358f7ee7abe03e4024cc574e4ebb17
https://github.com/Perl/perl5/commit/29f3baf9ce358f7ee7abe03e4024cc574e4ebb17
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M sv.c
Log Message:
-----------
perlapi: Add detail to sv_setpv_bufsize()
Commit: da3e7594fa27e3f5769d427afc1a392fae46ca71
https://github.com/Perl/perl5/commit/da3e7594fa27e3f5769d427afc1a392fae46ca71
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M perl.h
Log Message:
-----------
locale mutexes: Win32 are general without simulating
We can get rid of the simulation needed for other platforms.
Commit: b1c2e54d1485a2ea41505b86e75136b240c9eb43
https://github.com/Perl/perl5/commit/b1c2e54d1485a2ea41505b86e75136b240c9eb43
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
White
Commit: a8a3bbf236f9c4c42eb9523a82dc1e24997b99c0
https://github.com/Perl/perl5/commit/a8a3bbf236f9c4c42eb9523a82dc1e24997b99c0
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
fundamental
Commit: b22063f1249ab21784278458e44bc8ce2df30178
https://github.com/Perl/perl5/commit/b22063f1249ab21784278458e44bc8ce2df30178
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
immediate use
Commit: c93c7a5ca2397055b0db311f58a83bd5505f49c3
https://github.com/Perl/perl5/commit/c93c7a5ca2397055b0db311f58a83bd5505f49c3
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
more immed
Commit: 40c6f61f0d774702e125110569df40967b388267
https://github.com/Perl/perl5/commit/40c6f61f0d774702e125110569df40967b388267
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M embed.fnc
M embed.h
M locale.c
M proto.h
Log Message:
-----------
add is_cur_locale_utf8
Commit: f729c8a5b2c1edf564b821d8d265f0c6d4b6e35b
https://github.com/Perl/perl5/commit/f729c8a5b2c1edf564b821d8d265f0c6d4b6e35b
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
move subs around
Commit: d9b7bf58f3ab2d4cbec9487945efbe7b2ab548d2
https://github.com/Perl/perl5/commit/d9b7bf58f3ab2d4cbec9487945efbe7b2ab548d2
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
locale.c: Comments, white space
Commit: 06c5303846c812ddc56409ed274ec4fcde370524
https://github.com/Perl/perl5/commit/06c5303846c812ddc56409ed274ec4fcde370524
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
MULT
Commit: ba03954c15ea02a7d632e5bfd13ab8af186f058c
https://github.com/Perl/perl5/commit/ba03954c15ea02a7d632e5bfd13ab8af186f058c
Author: Karl Williamson <[email protected]>
Date: 2024-02-08 (Thu, 08 Feb 2024)
Changed paths:
M locale.c
Log Message:
-----------
final
Compare: https://github.com/Perl/perl5/compare/ca693a0cbfce...ba03954c15ea