Branch: refs/heads/smoke-me/khw-safe
  Home:   https://github.com/Perl/perl5
  Commit: eb6733a7017e088ce7fc4b83b78d2c8bbd8a51ae
      
https://github.com/Perl/perl5/commit/eb6733a7017e088ce7fc4b83b78d2c8bbd8a51ae
  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.h
    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: dfc7bf112b9515e52d7d30f098408889f8708d98
      
https://github.com/Perl/perl5/commit/dfc7bf112b9515e52d7d30f098408889f8708d98
  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: 87038f49d2d37284caa75ed9ab5a024c55dbb2ef
      
https://github.com/Perl/perl5/commit/87038f49d2d37284caa75ed9ab5a024c55dbb2ef
  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/c994b417b8cf...87038f49d2d3

Reply via email to