Branch: refs/heads/smoke-me/khw-safe Home: https://github.com/Perl/perl5 Commit: ef4ae7b679a6da681404762fbdac6964417904ac https://github.com/Perl/perl5/commit/ef4ae7b679a6da681404762fbdac6964417904ac Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021)
Changed paths: M MANIFEST M cop.h M ext/Opcode/Opcode.pm M feature.h M gv.c M keywords.c M keywords.h M lib/B/Deparse-core.t M lib/B/Deparse.pm M lib/B/Op_private.pm M lib/feature.pm M lib/warnings.pm M op.c M op.h M opcode.h M opnames.h M perly.act M perly.h M perly.tab M perly.y M pod/perldelta.pod M pod/perldiag.pod M pod/perlsyn.pod M pp_ctl.c M pp_proto.h M regen/feature.pl M regen/keywords.pl M regen/opcodes M regen/warnings.pl M t/op/coreamp.t M t/op/coresubs.t R t/op/try.t M toke.c M warnings.h Log Message: ----------- Revert "Initial attempt at feature 'try'" This reverts commit a1325b902d57aa7a99bed3d2ec0fa5ce42836207. as well as the pod corrections for it Commit: 22f89477e566e8623ddbe490b9b9dd5860662c62 https://github.com/Perl/perl5/commit/22f89477e566e8623ddbe490b9b9dd5860662c62 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Remove dead code This code was left in for a potential guide for the future. Now that I'm getting round to implementing it, I'm going in a different direction. Commit: 8a0b4b13337bfe8d63d874e6ef8c44f1d2c0ab69 https://github.com/Perl/perl5/commit/8a0b4b13337bfe8d63d874e6ef8c44f1d2c0ab69 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- Save and restore errno around DEBUG statements Adding DEBUG statements should not affect errno. But it could. I have in the past wrapped them in save/restores when it's become a problem. But that is effort that could have been conserved by just always doing it automatically. Commit: 5cb75bc01cd646f25652dbe5408de05f03571698 https://github.com/Perl/perl5/commit/5cb75bc01cd646f25652dbe5408de05f03571698 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- dTHX in DEBUG__ Commit: 879a04fc397816a5415587b3bf93766e73f270a5 https://github.com/Perl/perl5/commit/879a04fc397816a5415587b3bf93766e73f270a5 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- Create DEBUG macro for when two flags must be set There are some debugging statements that should only be displayed when two flags are set; so far the v flag and another. This commit creates a macro for that purpose that saves a conditional (at least when unoptimized) over the previous way to do it. Commit: 6cd0dc2c5fb8c9f9204345e4bbcf3febb3912e99 https://github.com/Perl/perl5/commit/6cd0dc2c5fb8c9f9204345e4bbcf3febb3912e99 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c M perl.h Log Message: ----------- DEBUG_L now also looks at environment variable Because locale initialization happens before command line processing, one can't pass a -DL argument to enable debugging of locale initialization. Instead, an environment variable is read then, and is used to enable debugging or not. In the past, code specifically had to test for this being set. This commit changes that so that debugging can automatically be enabled without having to write special code. Future commits will strip out those special checks. Commit: 326ad9aa6353fcd30000098859910ebc93a29df9 https://github.com/Perl/perl5/commit/326ad9aa6353fcd30000098859910ebc93a29df9 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Replace most #ifdef DEBUGGING lines THe previous commit enhanced the DEBUG macros so that they contain the logic that previously had to be done with conditional compilation statements. Removing them makes the code easier to read. Commit: 0a67441462f3acc79c3b232b40395d5dd7cb2909 https://github.com/Perl/perl5/commit/0a67441462f3acc79c3b232b40395d5dd7cb2909 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h M numeric.c M regcomp.c M regexec.c M utfebcdic.h Log Message: ----------- Change macro names to be C standard conformant C reserves symbols beginning with underscores for its own use. This commit moves the underscore so it is trailing, which is legal. The symbols changed here are most of the ones in handy.h that have few uses outside it. Commit: 958a71d0817f20aa9113c15058906cff0472b013 https://github.com/Perl/perl5/commit/958a71d0817f20aa9113c15058906cff0472b013 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: Refactor some #ifdef's for commonality This changes these compilation conditionals so that things in common between Windows and other platforms are only defined once. It changes the isWORDCHAR_LC definition for non-Windows to match that platform, adding an UNLIKELY(). Commit: 8cd43caea6d1493db99d539259ffc2cb02e27d89 https://github.com/Perl/perl5/commit/8cd43caea6d1493db99d539259ffc2cb02e27d89 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: White-space, comment only Commit: 96bc382c9e6769f565e649bb570dc0f627b307e7 https://github.com/Perl/perl5/commit/96bc382c9e6769f565e649bb570dc0f627b307e7 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: Remove only call to an internal macro Replace isIDFIRST_LC with a slightly faster implementation, in line with what isWORDCHAR already does Commit: 9fba6b633532bec96104e34cfcdcdec77d7039f3 https://github.com/Perl/perl5/commit/9fba6b633532bec96104e34cfcdcdec77d7039f3 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M charclass_invlists.h M handy.h M l1_char_class_tab.h M lib/unicore/uni_keywords.pl M perl.c M perl.h M regcomp.c M regcomp.h M regen/mk_PL_charclass.pl M regexec.c M sv.c M uni_keywords.h M utfebcdic.h Log Message: ----------- Change macro names to be C standard conformant C reserves symbols beginning with underscores for its own use. This commit moves the underscore so it is trailing, which is legal. The symbols changed here are many of the ones in handy.h that have significant uses outside it. Commit: 264044a243d1e8abf412fe9e00e3bbf5343fda5d https://github.com/Perl/perl5/commit/264044a243d1e8abf412fe9e00e3bbf5343fda5d Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: Rmv unneeded generality The possible first character of an ID is always an alpha in the range 0-255, so there is no harm changing from the former to the latter. And future changes would otherwise have needed an extra parameter in a bunch of macros. Commit: f61054fbbce32b11d3febc2df0e6b9b6ce8f1409 https://github.com/Perl/perl5/commit/f61054fbbce32b11d3febc2df0e6b9b6ce8f1409 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: Don't special case isASCII_LC This was an attempt to save instructions, but future commits will need the generality Commit: d3ee232b0ed2d4611ac660ea2619946f961b8459 https://github.com/Perl/perl5/commit/d3ee232b0ed2d4611ac660ea2619946f961b8459 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M handy.h Log Message: ----------- handy.h: Refactor some internal macros This changes the parameters etc, in preparation for further changes Commit: 040426a5705dc33ec031ef2aebbb83ba0d9a9644 https://github.com/Perl/perl5/commit/040426a5705dc33ec031ef2aebbb83ba0d9a9644 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M proto.h M regexec.c Log Message: ----------- regexec.c: Make internal function static This used to be called from utf8.c, but no longer; no need to make it other than static. This allows the compiler to better optimize. Commit: 457f2d37980b7ff96a776d42458a2d262266f8d7 https://github.com/Perl/perl5/commit/457f2d37980b7ff96a776d42458a2d262266f8d7 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M globvar.sym M handy.h M inline.h M perl.h M proto.h M regexec.c Log Message: ----------- regexec.c: Use function call table to streamline code This replaces a switch() statement with a function pointer table. But the main reason I'm doing this is for future functionality. Commit: 6ef3cfd170c736bf9ce630719d6a51295bb19812 https://github.com/Perl/perl5/commit/6ef3cfd170c736bf9ce630719d6a51295bb19812 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Declare three static arrays to be so. Commit: 05c0978d605734e5f7b1b4eb879b2b6852cd69a7 https://github.com/Perl/perl5/commit/05c0978d605734e5f7b1b4eb879b2b6852cd69a7 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c M perl.h Log Message: ----------- Move some locale.c #defines to perl.h This is in preparation for them to be used in macros from outside locale.c Commit: a7da6019d64753fab9b6aac0e739cd88ff9d1a24 https://github.com/Perl/perl5/commit/a7da6019d64753fab9b6aac0e739cd88ff9d1a24 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c M perl.h Log Message: ----------- Mark newly moved symbols as private The previous commit made certain symbols that previously were local to locale.c now available everywhere. Add a trailing underscore to their names to mark them as private. Commit: 15b88dca1791bf2966aa7e668e3c13b3fcdc1b35 https://github.com/Perl/perl5/commit/15b88dca1791bf2966aa7e668e3c13b3fcdc1b35 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- Split internal function into two This splits out the portion of a function that calculates the index into our tables from a locale category. This immediately allows the calling sequence to be simplified, but future commits will have use for just the functionality of the new function. One debugging statement is also removed from the new split out function, which was not really necessary, and made it harder to do the next commit. Commit: 57653d0ae12b81454c0dadaa6a62ff9d4732da3a https://github.com/Perl/perl5/commit/57653d0ae12b81454c0dadaa6a62ff9d4732da3a Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M ext/POSIX/POSIX.xs Log Message: ----------- POSIX.xs: Add locks around certain operations These operations may have races without these newly created locks. Commit: 7da521c7e1aab2cce92306dac5a5a570c585c9a6 https://github.com/Perl/perl5/commit/7da521c7e1aab2cce92306dac5a5a570c585c9a6 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M ext/POSIX/POSIX.xs Log Message: ----------- POSIX.xs: Use macro to reduce complexity This #defines a macro and uses it to populate a structure, so that strings don't have to be typed twice. Commit: bb626b2d701466edb61a49c5a92acde6c1654b8e https://github.com/Perl/perl5/commit/bb626b2d701466edb61a49c5a92acde6c1654b8e Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M ext/POSIX/POSIX.xs Log Message: ----------- POSIX.xs: White-space only Properly indent some nested preprocessor directives Commit: 9a53b64eec25ce2d513b33a1231e05e5427a09ef https://github.com/Perl/perl5/commit/9a53b64eec25ce2d513b33a1231e05e5427a09ef Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M ext/POSIX/POSIX.xs Log Message: ----------- POSIX.xs: Remove excess conditional This conditional is just extra execution time on platforms where the underlying field doesn't exist. Don't compile it on such platforms. Commit: 4bd7cfed2c5a95d51fa4db7908e3216f3d9ba4db https://github.com/Perl/perl5/commit/4bd7cfed2c5a95d51fa4db7908e3216f3d9ba4db Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Use nocontext; avoid rarely needed dTHX This is a rare case; no point in doing a dTHX just for it. Commit: 12c8a165ce1385313facb1b830d616bc6114200f https://github.com/Perl/perl5/commit/12c8a165ce1385313facb1b830d616bc6114200f Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c M pod/perldelta.pod M pod/perldiag.pod Log Message: ----------- locale.c: Simplify function We can use the function split-out in the previous commit to simplify this. Also, when I wrote it I didn't know about Perl_form(), and reimplemented a portion of it here; that can be yanked as well. Commit: 9bb420b622587a8f19938c94537197c3018c218a https://github.com/Perl/perl5/commit/9bb420b622587a8f19938c94537197c3018c218a Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Move unreachable code It turns out this code, setting errno, is unreachable. Move it to the place where it would do some good, removing an extraneous, unreachable return; Commit: b4f1ac51febb5254736789c8c6e02d493a4ad015 https://github.com/Perl/perl5/commit/b4f1ac51febb5254736789c8c6e02d493a4ad015 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Comment clarifications, white space Commit: ff32bb0bb5df6353332426cd79491a6036d0e03b https://github.com/Perl/perl5/commit/ff32bb0bb5df6353332426cd79491a6036d0e03b Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Separate the query part of emulate_setlocale This splits a large function so that it is easier to comprehend, and is in preparation for them to be separately callable. Commit: 9022a2adb289488787929e4f8dedf812ed17b4a6 https://github.com/Perl/perl5/commit/9022a2adb289488787929e4f8dedf812ed17b4a6 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Remove spaces around a '##' preprocessor directive It turns out that at least my gcc preprocessor gets confused in some contexts if spaces surround the ##. CAT2() doesn't work for these. It is working in this context, but future commits will introduce ones where it won't, so this commit will help make things consistent within this file What seems to fail is #define f(x) (..., g(x ## y), ...) where 'x' is a an already #defined symbol. I want 'xy', but instead, for example if 'x' has been defined to be 1, I get '1y' Commit: eec4a3aac86f6c676555d06442dbd79d312b7740 https://github.com/Perl/perl5/commit/eec4a3aac86f6c676555d06442dbd79d312b7740 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Create new macros for just querying locale Now that the query portion has been split off, we can go to it directly. Commit: c9f477dcbc24b67bc806f6bea58653fc0e2f0c8d https://github.com/Perl/perl5/commit/c9f477dcbc24b67bc806f6bea58653fc0e2f0c8d Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Generalize certain Win32 calls The old versions were windows-specific; the changes use a more generic macro that currently expands to the same thing, but future commits will change that. Commit: 1e0e1bf393d0b6360883af73ef5baffabc9fd85d https://github.com/Perl/perl5/commit/1e0e1bf393d0b6360883af73ef5baffabc9fd85d Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.: Create macros to call setlocale in special return contexts Future commits will benefit from knowing if the return value of setlocale is to be ignored, just checked for if it worked, or the full value is needed. Commit: 88ade53c76e1a2cedcb44280d7b3307af4e9cfbc https://github.com/Perl/perl5/commit/88ade53c76e1a2cedcb44280d7b3307af4e9cfbc Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Split a static function into two parts One part doesn't have to be compiled on platforms that don't have the libc function querylocale(). It makes it easier to grok when that part isn't inlined with the other part. But more importantly, the split off part will be called separately in future commits. Commit: 468b8705ec5526d5a284e088e2e870ec0ebddbd4 https://github.com/Perl/perl5/commit/468b8705ec5526d5a284e088e2e870ec0ebddbd4 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M embed.fnc M embed.h M locale.c M proto.h Log Message: ----------- locale.c: Use a function table to simplify code Some locale categories require extra steps when they are changed. This moves that logic to a table, which gets rid of some code Commit: 5590fdaa59728117f1c980191997c4b3943e006e https://github.com/Perl/perl5/commit/5590fdaa59728117f1c980191997c4b3943e006e Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Same code for all queries of current locale Previously querying LC_NUMERIC and LC_ALL were treated specially; other queries were lumped in with changes. Changing some categories involves a non-trivial amount of work. This commit avoids that by moving all queries to the same 'if' branch. LC_NUMERIC and LC_ALL still have to be treated specially, but now it's all within the same outer 'if'. Commit: 2b307da455a3eea4c9cfcfabf4cf0063125ac764 https://github.com/Perl/perl5/commit/2b307da455a3eea4c9cfcfabf4cf0063125ac764 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M t/loc_tools.pl Log Message: ----------- loc_tools Commit: 7747a7f15e89d39d106d5d5fe9019c77016cad33 https://github.com/Perl/perl5/commit/7747a7f15e89d39d106d5d5fe9019c77016cad33 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cygwin/cygwin.c M dist/IO/IO.pm M embed.fnc M embed.h M embedvar.h M ext/I18N-Langinfo/Langinfo.pm M ext/I18N-Langinfo/Langinfo.xs M ext/POSIX/POSIX.xs M ext/POSIX/lib/POSIX.pm M ext/POSIX/lib/POSIX.pod M ext/POSIX/t/mb.t M handy.h M inline.h M intrpvar.h M iperlsys.h M lib/locale_threads.t M locale.c M makedef.pl M perl.c M perl.h M perl_langinfo.h M pod/perllocale.pod M proto.h M regen/reentr.pl M regexec.c M sv.c M t/harness M t/porting/known_pod_issues.dat M t/re/charset.t M t/run/locale.t M thread.h M unixish.h M util.c Log Message: ----------- 2008 Commit: 8f0917f82ec42f8df83234360178f9adc9565a97 https://github.com/Perl/perl5/commit/8f0917f82ec42f8df83234360178f9adc9565a97 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h M perlvars.h Log Message: ----------- Remove no longer used mutex A previous commit removed all need for this. Commit: d9ae14e4f85d8f33362e1872bdff7c60916b395c https://github.com/Perl/perl5/commit/d9ae14e4f85d8f33362e1872bdff7c60916b395c Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M ebcdic_tables.h M embedvar.h M globvar.sym M inline.h M intrpvar.h M perl.h M regen/ebcdic.pl Log Message: ----------- XXX finish fold_locale tests, copy in thread create Commit: 36d39b30cee41dd2ad7043ccf279cd0b087cbbdb https://github.com/Perl/perl5/commit/36d39b30cee41dd2ad7043ccf279cd0b087cbbdb Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- XXX inspect, trailing white: perl.h: refactor Commit: 9e169f7b112d04729b656c74a1ff756ade285ba8 https://github.com/Perl/perl5/commit/9e169f7b112d04729b656c74a1ff756ade285ba8 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M pp.c Log Message: ----------- XXX pp.c: do %g print under mutex, Commit: ecc6a638f3082d386e44cca714b8a2c98bca6489 https://github.com/Perl/perl5/commit/ecc6a638f3082d386e44cca714b8a2c98bca6489 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M intrpvar.h Log Message: ----------- intrpvar.h: Addd clarifying comment Commit: 129eaeebd8d69112112be8d7f08bc0c975c4fc35 https://github.com/Perl/perl5/commit/129eaeebd8d69112112be8d7f08bc0c975c4fc35 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h M time64.c M util.c Log Message: ----------- Change name of mutex macros for ENV/LOCALE locking The names were somewhat confusing. Commit: 15840a4033faf9c1c6c05e07cc1452a1176cd815 https://github.com/Perl/perl5/commit/15840a4033faf9c1c6c05e07cc1452a1176cd815 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- perl.h: Move some statements So they are closer to related statements Commit: 995e055b4b2787823b0e72c9f09cb3be4ac5f7dd https://github.com/Perl/perl5/commit/995e055b4b2787823b0e72c9f09cb3be4ac5f7dd Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M perl.h Log Message: ----------- XXX finish msg Implement combo ENV/LOCALE mutexes There are cases where an executing function is vulnerable to either the locale or environment being changed by another thread. This implements macros that use mutexes to protect these critical sections. There are two cases that exist: one where the functions only read; and one where they can also need exclusive control so that a competing thread can't overwrite the returned static buffer before it is safely copied. 5.32 had a placeholder for these, but didn't actually implement it. Instead it locked just the ENV portion. On modern platforms with thread-safe locales, the locale portion is a no-op anyway, so things worked on them. This new commit extends that safety to other platforms. This has long been a vulnerability in Perl, but Commit: 56b33350808ebcd3b25ee8bf48aa0dc0a2281f98 https://github.com/Perl/perl5/commit/56b33350808ebcd3b25ee8bf48aa0dc0a2281f98 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- locale.c: Refactor #ifdef's for clarity The my_strerror() function has effectively 5 different implementations depending on the capabilities of the platform. Only a few lines are common to all, the set-up and the return. The #ifdefs obscure the underlying logic. So this commit separates them out into 5 different functions, with the result that it's clear what is going on in each. Commit: 7e66ca1301b14912678057b9405c6f8415a03f83 https://github.com/Perl/perl5/commit/7e66ca1301b14912678057b9405c6f8415a03f83 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c M mg.c Log Message: ----------- more strerror mg.c Commit: e0bccc263f4a41c744b0743457abd4efe057bf24 https://github.com/Perl/perl5/commit/e0bccc263f4a41c744b0743457abd4efe057bf24 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M locale.c Log Message: ----------- XXX prob drop; done before anything so no races Commit: cb0bcabe920a32a7d914c94cf97d3854d358c769 https://github.com/Perl/perl5/commit/cb0bcabe920a32a7d914c94cf97d3854d358c769 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M util.c Log Message: ----------- XXX util.c: LOCALTIME lock Commit: ea7a6f885f826e9ace27e72109ed2eecf71916a0 https://github.com/Perl/perl5/commit/ea7a6f885f826e9ace27e72109ed2eecf71916a0 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M time64.c Log Message: ----------- time64.c: Remove no longer needed code This code defined some macros; those are now defined by perl.h Commit: 065c60d9162c98a7e10ac0209a76bfc571b9d9e1 https://github.com/Perl/perl5/commit/065c60d9162c98a7e10ac0209a76bfc571b9d9e1 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M pp_sys.c Log Message: ----------- XXX need to StructCopy pp_sys mutexes Commit: 36cc02925ec0a32d2527fb112ba44dd322ddfa63 https://github.com/Perl/perl5/commit/36cc02925ec0a32d2527fb112ba44dd322ddfa63 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M win32/win32.c Log Message: ----------- win32.c: Add mutexes around some calls These could have races. Commit: 988a4a9a044240cf899c3c3752d8cc9b72970337 https://github.com/Perl/perl5/commit/988a4a9a044240cf899c3c3752d8cc9b72970337 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M win32/win32.c Log Message: ----------- more_win32.c Commit: 02f55359c3c93ffb3e8c881d65adb2646d0f25ac https://github.com/Perl/perl5/commit/02f55359c3c93ffb3e8c881d65adb2646d0f25ac Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M util.c Log Message: ----------- mktime needs to run under a mutex per the Posix standard Commit: 90206a654133b7d93f976cbab6df085e661a2bc0 https://github.com/Perl/perl5/commit/90206a654133b7d93f976cbab6df085e661a2bc0 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod Log Message: ----------- XXX perlxs Commit: 58cc5e6d82573f5380929ae779c88797a5621601 https://github.com/Perl/perl5/commit/58cc5e6d82573f5380929ae779c88797a5621601 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M dist/ExtUtils-ParseXS/lib/perlxs.pod Log Message: ----------- more perlxs Commit: 0909aac45288284ec026b33483207cf16ca775ac https://github.com/Perl/perl5/commit/0909aac45288284ec026b33483207cf16ca775ac Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M os2/os2.c Log Message: ----------- os2: Use many reader lock instead of exclusive This is just reading the environment, not changing it, so a many readers can be accessing it at the same time. Commit: 2ddd8456784aaeba79a039829b338cd1c2803ec2 https://github.com/Perl/perl5/commit/2ddd8456784aaeba79a039829b338cd1c2803ec2 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M dosish.h M unixish.h Log Message: ----------- XXX Fix IO destruction order During destruction, a list is executed in order. Here's a couple of them: OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; If something goes wrong, and the I/O system has already been destructed, it's hard to figure out what's going on. This is solved simply by moving the I/O termination to the end of the list. revert move Commit: cedcff7df1eecc80caa0692fa9d21d56ca1c13b6 https://github.com/Perl/perl5/commit/cedcff7df1eecc80caa0692fa9d21d56ca1c13b6 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.pm M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX cpan PR Time-Piece Commit: 549500d7e71f8ca31e13024089799c81e136acc8 https://github.com/Perl/perl5/commit/549500d7e71f8ca31e13024089799c81e136acc8 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- cpan/Time-Piece/Piece.xs: Use foldEQ_locale() if available Using this is preferable to the glibc function due to it being tailored for Perl, and is thread-safe in the latest versions. Commit: 085ec4449b299048781bf27eea643771f5e5b9c3 https://github.com/Perl/perl5/commit/085ec4449b299048781bf27eea643771f5e5b9c3 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Time-Piece/Piece.xs: Use isDIGIT, not isdigit isDIGIT is not locale-dependent, matching just [0-9]. There was a bug using isdigit() in at least one place where it calculated the value of the digit by subtracting the original of '0' from it. This works only if the digit is in [0-9], but there are locales where there is another set of digits, and so would give a very wrong result. That makes it clear to me that only [0-9] were assumed by the original authors. Commit: 728901db904f311f6913b179f8518c3574778b3c https://github.com/Perl/perl5/commit/728901db904f311f6913b179f8518c3574778b3c Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time-Piece/Piece.xs: Use isSPACE not isspace Same msg as prev commit Commit: 4855fc4d42f8141c476022dc0789c71eb532bd20 https://github.com/Perl/perl5/commit/4855fc4d42f8141c476022dc0789c71eb532bd20 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time-Piece/Piece.xs: Use isUPPER not isupper Same msg as prev commit Commit: 84e28d66577deb094291032580f6ba3812548e94 https://github.com/Perl/perl5/commit/84e28d66577deb094291032580f6ba3812548e94 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- XXX Time Piece temporary Commit: 903f5357c88031058de3fb210e7ae401aabd5e51 https://github.com/Perl/perl5/commit/903f5357c88031058de3fb210e7ae401aabd5e51 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M cpan/Time-Piece/Piece.xs Log Message: ----------- Timepiece Commit: 8356aa672e508f14c487c3b65488a88ebcbcdce5 https://github.com/Perl/perl5/commit/8356aa672e508f14c487c3b65488a88ebcbcdce5 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M pod/perlhacktips.pod Log Message: ----------- XXX incomplete perlhacktips: Commit: 2dac9515b1a4ef36fdeeb28b07ebc0e54e8b1cf1 https://github.com/Perl/perl5/commit/2dac9515b1a4ef36fdeeb28b07ebc0e54e8b1cf1 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M dist/IO/IO.xs Log Message: ----------- XXX check if using ppport IO.xs: Remove fallback code furnished by ppport Commit: e24ae3d8857a8d70d546bc19e2021d8217a816a6 https://github.com/Perl/perl5/commit/e24ae3d8857a8d70d546bc19e2021d8217a816a6 Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M hints/freebsd.sh Log Message: ----------- XXX check with freebsd: hints/freebsd.sh Commit: 47a2b372d1ad8208b88e8d656aa83bebfb4488ff https://github.com/Perl/perl5/commit/47a2b372d1ad8208b88e8d656aa83bebfb4488ff Author: Karl Williamson <k...@cpan.org> Date: 2021-02-07 (Sun, 07 Feb 2021) Changed paths: M lib/locale_threads.t M locale.c M perl.h M t/loc_tools.pl Log Message: ----------- f Compare: https://github.com/Perl/perl5/compare/e476a8b71484...47a2b372d1ad