[issue42176] Valgrind reports "Conditional jump or move depends on uninitialised value(s)" in `PyUnicode_AsEncodedString` and `PyUnicode_Decode`

Boris Staletic report at bugs.python.org
Tue Oct 27 17:45:26 EDT 2020


Boris Staletic <boris.staletic at gmail.com> added the comment:

I can also reproduce the same problem with the ubuntu packaged python3, which is 3.8.5 on Ubuntu 20.04. The only problem is that, with a stripped library, you don't get line numbers in valgrind's output. Steps to repro:

1. apt install valgrind gcc python3-config
2. Save the same attached file from the first comment as test.c.
3. gcc $(python3-config --includes) $(python3-config --ldflags) -lpython3.8 -o python-error
4. PYTHONMALLOC=malloc valgrind ./python-error

Valgrind output:

==1200== Conditional jump or move depends on uninitialised value(s)
==1200==    at 0x4A7B37B: PyUnicode_Decode (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==1200==    by 0x109264: main (in /python-error)
==1200==
==1200== Conditional jump or move depends on uninitialised value(s)
==1200==    at 0x4A7AE57: PyUnicode_AsEncodedString (in /usr/lib/x86_64-linux-gnu/libpython3.8.so.1.0)
==1200==    by 0x109280: main (in /python-error)

I have not checked earlier versions of python.

----------
versions: +Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42176>
_______________________________________


More information about the Python-bugs-list mailing list