Author vstinner
Recipients vstinner
Date 2019-09-11.15:28:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org>
In-reply-to
Content
Running tokenize.py in Valgrind emits 2 warnings:

$ ./configure --with-valgrind
$ make
$ echo|PYTHONMALLOC=malloc valgrind ./python Lib/tokenize.py

(A)

==30746== Conditional jump or move depends on uninitialised value(s)
==30746==    at 0x4A01F7: PyUnicode_Decode (unicodeobject.c:3395)
==30746==    by 0x4A01F7: PyUnicode_Decode (unicodeobject.c:3350)
==30746==    by 0x4A062E: PyUnicode_FromEncodedObject (unicodeobject.c:3268)
==30746==    by 0x4A090D: unicode_new (unicodeobject.c:15125)
==30746==    by 0x46F515: type_call (typeobject.c:969)
==30746==    by 0x435F82: _PyObject_MakeTpCall (call.c:167)
==30746==    by 0x422B3A: _PyObject_Vectorcall (abstract.h:104)
==30746==    by 0x422B3A: _PyObject_Vectorcall (abstract.h:96)
==30746==    by 0x422B3A: call_function (ceval.c:4984)
==30746==    by 0x423C26: _PyEval_EvalFrameDefault (ceval.c:3496)
==30746==    by 0x4217D2: function_code_fastcall (call.c:292)
==30746==    by 0x4360FC: _PyObject_FastCallDict (call.c:109)
==30746==    by 0x436309: _PyObject_Call_Prepend (call.c:447)
==30746==    by 0x4731F0: slot_tp_init (typeobject.c:6767)
==30746==    by 0x46F562: type_call (typeobject.c:989)

(B)

==30746== Conditional jump or move depends on uninitialised value(s)
==30746==    at 0x4DC8FF: PyState_AddModule (pystate.c:707)
==30746==    by 0x485A5E1: PyInit_zlib (zlibmodule.c:1472)
==30746==    by 0x4CA49C: _PyImport_LoadDynamicModuleWithSpec (importdl.c:164)
==30746==    by 0x4C8462: _imp_create_dynamic_impl (import.c:2292)
==30746==    by 0x4C8462: _imp_create_dynamic (import.c.h:330)
==30746==    by 0x570783: cfunction_vectorcall_FASTCALL (methodobject.c:382)
==30746==    by 0x435ACD: PyVectorcall_Call (call.c:203)
==30746==    by 0x42424F: do_call_core (ceval.c:5031)
==30746==    by 0x42424F: _PyEval_EvalFrameDefault (ceval.c:3557)
==30746==    by 0x4AF4CF: _PyEval_EvalCodeWithName (ceval.c:4296)
==30746==    by 0x435D3F: _PyFunction_Vectorcall (call.c:355)
==30746==    by 0x422AA8: _PyObject_Vectorcall (abstract.h:106)
==30746==    by 0x422AA8: call_function (ceval.c:4984)
==30746==    by 0x428E51: _PyEval_EvalFrameDefault (ceval.c:3465)
==30746==    by 0x4217D2: function_code_fastcall (call.c:292)

Warning (A) goes away when Python is compiled with gcc -O1.

Warning (B) is still present when Python is compiled with gcc -O0.


It's unclear to me if it's a false alarm or a real issue.


On Fedora, the issue can be seen with:

   echo|valgrind python3 /usr/lib64/python3.7/tokenize.py

On Fedora 30, python3 is Python 3.7.4.


Downstream Fedora issue: https://bugzilla.redhat.com/show_bug.cgi?id=1751208
History
Date User Action Args
2019-09-11 15:28:57vstinnersetrecipients: + vstinner
2019-09-11 15:28:57vstinnersetmessageid: <1568215737.14.0.192001407155.issue38118@roundup.psfhosted.org>
2019-09-11 15:28:57vstinnerlinkissue38118 messages
2019-09-11 15:28:56vstinnercreate