[issue9242] unicodeobject.c: use of uninitialized values

Stefan Krah report at bugs.python.org
Fri Jul 16 13:11:01 CEST 2010

Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Here is a minimal example how to reproduce this issue, extracted from

valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python uninitialized.py

It seems that in Lib/codecs.py the equivalent of "\x00".decode('utf-32-le')
is called (line 477).

This leads to:

PyUnicodeUCS2_DecodeUTF32Stateful (s=0x5b0fc0c "", size=1, errors=0x5add144 "strict", byteorder=0x7fefff39c, 

So we have a string of size 1, but s[2] and s[3] will be accessed
in the function.

Added file: http://bugs.python.org/file18025/uninitialized.py

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list