Branch: refs/heads/smoke-me/khw-safe
Home: https://github.com/Perl/perl5
Commit: 7425d03577db94c3d44118e4fb25b3790e73ba2f
https://github.com/Perl/perl5/commit/7425d03577db94c3d44118e4fb25b3790e73ba2f
Author: Karl Williamson <[email protected]>
Date: 2020-12-12 (Sat, 12 Dec 2020)
Changed paths:
M thread.h
Log Message:
-----------
Make many-reader mutexes more resilient
These mutexes rely on a counter being accurate to work. If for some
reason that I can't imagine happening, the count goes below 0, this
commit resets it to zero, which may be enough to cause the program to
continue.
Commit: 235f313d08517d7556b26278eb948cc1423c9d67
https://github.com/Perl/perl5/commit/235f313d08517d7556b26278eb948cc1423c9d67
Author: Karl Williamson <[email protected]>
Date: 2020-12-12 (Sat, 12 Dec 2020)
Changed paths:
M perl.h
M perlvars.h
Log Message:
-----------
perl.h: Add capability for many-reader ENV mutex locking
There are several places where there could be a problem in the
environment were changed by another thread when a function is executing,
but otherwise if another thread were reading the environment at the same
time, there isn't a problem. This adds mutex for that situation.
Future commits will take advantage of it.
Commit: 24671af043bde46be7e0fb2461a23b0d4d557e1c
https://github.com/Perl/perl5/commit/24671af043bde46be7e0fb2461a23b0d4d557e1c
Author: Karl Williamson <[email protected]>
Date: 2020-12-12 (Sat, 12 Dec 2020)
Changed paths:
M Configure
M Cross/config.sh-arm-linux
M Cross/config.sh-arm-linux-n770
M NetWare/config.wc
M Porting/config.sh
M config_h.SH
M configure.com
M metaconfig.h
M plan9/config_sh.sample
M uconfig.h
M uconfig.sh
M uconfig64.sh
M win32/config.gc
M win32/config.vc
Log Message:
-----------
Add Configure probe for getenv() buffer thread-safe
This probes that a call to getenv() in another thread doesn't zap ours.
The zapping is allowed by the Posix standard, but should be rare in
practice.
Commit: a098ec85039ffd9078d53b773c06792d46d7f7b9
https://github.com/Perl/perl5/commit/a098ec85039ffd9078d53b773c06792d46d7f7b9
Author: Karl Williamson <[email protected]>
Date: 2020-12-12 (Sat, 12 Dec 2020)
Changed paths:
M inline.h
M perl.h
Log Message:
-----------
Add GETENV_LOCK
get_env() needs to lock other threads from writing to the environment
while it is executing. It may need to have an exclusive lock if those
threads can clobber its buffer before it gets a chance to save them.
The previous commit has added a Configure probe which tells us if that
is the case. This commit uses it to select which type of mutex to use.
Commit: f10a55173c66ae07a63fe3b1a1ba45e029f9e597
https://github.com/Perl/perl5/commit/f10a55173c66ae07a63fe3b1a1ba45e029f9e597
Author: Karl Williamson <[email protected]>
Date: 2020-12-12 (Sat, 12 Dec 2020)
Changed paths:
M embedvar.h
M inline.h
M intrpvar.h
M makedef.pl
M sv.c
M util.c
Log Message:
-----------
Fix broken PERL_MEM_LOG under threads
This fixes GH #18341
There are problems with getenv() on threaded perls wchich can lead to
incorrect results when compiled with PERL_MEM_LOG.
Commit 0b83dfe6dd9b0bda197566adec923f16b9a693cd fixed this for some
platforms, but as Tony Cook, pointed out there may be
standards-compliant platforms that that didn't fix.
The detailed comments outline the issues and (complicated) full solution.
Compare: https://github.com/Perl/perl5/compare/0960186c0bad...f10a55173c66