Branch: refs/heads/smoke-me/khw-safe
  Home:   https://github.com/Perl/perl5
  Commit: a716fe46c6d39327afd271d29b3af8fadc28fedd
      
https://github.com/Perl/perl5/commit/a716fe46c6d39327afd271d29b3af8fadc28fedd
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-16 (Wed, 16 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: 5b715737d5023fd1aaded9f7a5aa07df2831f9f3
      
https://github.com/Perl/perl5/commit/5b715737d5023fd1aaded9f7a5aa07df2831f9f3
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-16 (Wed, 16 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: d7ce355e1f880482185497aad745a0bbf1e01de9
      
https://github.com/Perl/perl5/commit/d7ce355e1f880482185497aad745a0bbf1e01de9
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-16 (Wed, 16 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.sh
    M uconfig64.sh
    M win32/config.gc
    M win32/config.vc

  Log Message:
  -----------
  Add Configure probe for getenv() buffer race

Most implementations do not have a problem with two getenv()'s running
simultaneously in different threads.  But Posix doesn't require such
good behavior.  This adds a simple probe to test the current system.


  Commit: d69fb8882ca334d212b4c590f9d426223191e969
      
https://github.com/Perl/perl5/commit/d69fb8882ca334d212b4c590f9d426223191e969
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-16 (Wed, 16 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: c994b417b8cf4ab28415058235795b5aa0bd3777
      
https://github.com/Perl/perl5/commit/c994b417b8cf4ab28415058235795b5aa0bd3777
  Author: Karl Williamson <[email protected]>
  Date:   2020-12-16 (Wed, 16 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/f10a55173c66...c994b417b8cf

Reply via email to