SIGN IN SIGN UP

bpo-37931: Fix crash on OSX re-initializing os.environ (GH-15428)

On most platforms, the `environ` symbol is accessible everywhere.

In a dylib on OSX, it's not easily accessible, you need to find it with
_NSGetEnviron.

The code was caching the *value* of environ. But a setenv() can change the value,
leaving garbage at the old value. Fix: don't cache the value of environ, just
read it every time.
B
Benoit Hudson committed
723f71abf7ab0a7be394f9f7b2daa9ecdf6fb1eb
Parent: e76ee1a
Committed by Victor Stinner <vstinner@python.org> on 12/6/2019, 7:15:03 PM