[issue3367] Uninitialized value read in parsetok.c

Stefan Krah report at bugs.python.org
Tue Mar 20 10:50:59 CET 2012


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

It isn't fixed. Also, there's now an additional invalid read in
sys_update_path():

$ valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python 
==20258== Memcheck, a memory error detector
==20258== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==20258== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==20258== Command: ./python
==20258== 
Python 3.3.0a1+ (default:0554183066b5, Mar 20 2012, 10:47:41) 
[GCC 4.4.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
==20258== Invalid read of size 8
==20258==    at 0x4C9F6F: sys_update_path (sysmodule.c:1742)
==20258==    by 0x4CA268: PySys_SetArgvEx (sysmodule.c:1830)
==20258==    by 0x4CA28F: PySys_SetArgv (sysmodule.c:1836)
==20258==    by 0x4D9930: Py_Main (main.c:647)
==20258==    by 0x41AE1F: main (python.c:63)
==20258==  Address 0x5a58048 is 0 bytes after a block of size 8 alloc'd
==20258==    at 0x4C27878: malloc (vg_replace_malloc.c:236)
==20258==    by 0x41DF90: PyMem_Malloc (object.c:1841)
==20258==    by 0x41ACC4: main (python.c:25)
==20258== 
==20258== 
==20258== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- n
>>> 
==20258== Conditional jump or move depends on uninitialised value(s)
==20258==    at 0x52B030: parsetok (parsetok.c:207)
==20258==    by 0x52AD51: PyParser_ParseFileFlagsEx (parsetok.c:108)
==20258==    by 0x4BFCDA: PyParser_ASTFromFile (pythonrun.c:1973)
==20258==    by 0x4BDB5A: PyRun_InteractiveOneFlags (pythonrun.c:1196)
==20258==    by 0x4BD83D: PyRun_InteractiveLoopFlags (pythonrun.c:1106)
==20258==    by 0x4BD6E2: PyRun_AnyFileExFlags (pythonrun.c:1075)
==20258==    by 0x4D9118: run_file (main.c:306)
==20258==    by 0x4D9C0B: Py_Main (main.c:720)
==20258==    by 0x41AE1F: main (python.c:63)
==20258==

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3367>
_______________________________________


More information about the Python-bugs-list mailing list