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. (cherry picked from commit 723f71a) Co-authored-by: Benoit Hudson <benoit@imgspc.com>
|
@benoithudson and @vstinner: Status check is done, and it's a success ✅ . |
|
@benoithudson and @vstinner: Status check is done, and it's a success ✅ . |
|
@benoithudson and @vstinner: Status check is done, and it's a success ✅ . |
On most platforms, the
environsymbol 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.
(cherry picked from commit 723f71a)
Co-authored-by: Benoit Hudson benoit@imgspc.com
https://bugs.python.org/issue37931