This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Invalid read in symtable.c
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, python-dev, skrah
Priority: normal Keywords:

Created on 2011-07-02 11:43 by skrah, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Messages (2)
msg139636 - (view) Author: Stefan Krah (skrah) * (Python committer) Date: 2011-07-02 11:43
After 151142c0c5b1 Valgrind finds an invalid read in symtable.c, line 907:

  st->st_cur = (PySTEntryObject *)PyList_GET_ITEM(st->st_stack, size - 2);


==14301== Memcheck, a memory error detector
==14301== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==14301== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==14301== Command: ./python
==14301== 
==14301== Invalid read of size 8
==14301==    at 0x4A1B30: symtable_exit_block (symtable.c:907)
==14301==    by 0x49FFA3: PySymtable_Build (symtable.c:276)
==14301==    by 0x473B42: PyAST_CompileEx (compile.c:295)
==14301==    by 0x49E37D: run_mod (pythonrun.c:1790)
==14301==    by 0x49E10E: PyRun_StringFlags (pythonrun.c:1727)
==14301==    by 0x45EBFB: builtin_exec (bltinmodule.c:818)
==14301==    by 0x54E2FF: PyCFunction_Call (methodobject.c:81)
==14301==    by 0x471B4C: call_function (ceval.c:3957)
==14301==    by 0x46D482: PyEval_EvalFrameEx (ceval.c:2663)
==14301==    by 0x470060: PyEval_EvalCodeEx (ceval.c:3393)
==14301==    by 0x47208A: fast_function (ceval.c:4055)
==14301==    by 0x471C9F: call_function (ceval.c:3978)
==14301==  Address 0x691df18 is 8 bytes before a block of size 32 alloc'd
==14301==    at 0x4C27972: realloc (vg_replace_malloc.c:525)
==14301==    by 0x5367FB: list_resize (listobject.c:62)
==14301==    by 0x537F5B: list_ass_slice (listobject.c:643)
==14301==    by 0x5381BA: PyList_SetSlice (listobject.c:677)
==14301==    by 0x4A1B61: symtable_exit_block (symtable.c:909)
==14301==    by 0x4A2997: symtable_visit_stmt (symtable.c:1128)
==14301==    by 0x49FED2: PySymtable_Build (symtable.c:256)
==14301==    by 0x473B42: PyAST_CompileEx (compile.c:295)
==14301==    by 0x49E37D: run_mod (pythonrun.c:1790)
==14301==    by 0x49E10E: PyRun_StringFlags (pythonrun.c:1727)
==14301==    by 0x45EBFB: builtin_exec (bltinmodule.c:818)
==14301==    by 0x54E2FF: PyCFunction_Call (methodobject.c:81)
msg139654 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-07-02 14:18
New changeset 6b3872a11299 by Benjamin Peterson in branch 'default':
fix possibily uninitialized memory usage (closes #12474)
http://hg.python.org/cpython/rev/6b3872a11299
History
Date User Action Args
2022-04-11 14:57:19adminsetgithub: 56683
2011-07-02 14:18:06python-devsetstatus: open -> closed

nosy: + python-dev
messages: + msg139654

resolution: fixed
stage: resolved
2011-07-02 11:43:14skrahcreate