STINNER Victor added the comment:
The leak can reproduce only using this test:
def test_execve_invalid_env(self):
args = [sys.executable, '-c', 'pass']
# equal character in the enviroment variable name
newenv = os.environ.copy()
newenv["FRUIT=ORANGE"] = "lemon"
with self.assertRaises(ValueError):
os.execve(args[0], args, newenv)
It seems like the bug is in parse_envlist() function of Modules/posixmodule.c,
when a key contains the '=' character.
----------
keywords: +easy (C)
title: test_execve_invalid_env() of test_os leaks references -> [EASY (C)]
test_execve_invalid_env() of test_os leaks references
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue30769>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com