[issue25630] SIGSEGV in os.putenv()
Paweł Krawczyk
report at bugs.python.org
Sun Nov 15 18:22:18 EST 2015
New submission from Paweł Krawczyk:
A numerical value argument of the os.putenv() call causes my python3.5 to crash with SIGSEGV, for example:
Python 3.5.0+ (default, Oct 11 2015, 09:05:38)
[GCC 5.2.1 20151010] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.putenv('AAA', 1)
Segmentation fault (core dumped)
While numerical 1 (one) is not a valid argument for the function which expects a string as value, it shouldn't crash but rather throw an exception. This seems to be the behaviour in python3.4:
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.putenv('AAA', 1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Can't convert 'int' object to str implicitly
>>>
I can provide a strace/ltrace/core dump but it's huge and I'm not sure if it's necessary taking into account that this issue is trivial to reproduce.
----------
components: Library (Lib)
messages: 254700
nosy: Paweł Krawczyk
priority: normal
severity: normal
status: open
title: SIGSEGV in os.putenv()
type: crash
versions: Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25630>
_______________________________________
More information about the Python-bugs-list
mailing list