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.

Author skrah
Recipients Sworddragon, brett.cannon, r.david.murray, serhiy.storchaka, skrah
Date 2013-11-10.14:19:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20131110141939.GA11546@sleipnir.bytereef.org>
In-reply-to <1384031533.7.0.155155182241.issue19533@psf.upfronthosting.co.za>
Content
It looks like the memory management is based directly on Py_Arenas:

def f():
    """squeamish ossifrage"""
    pass

Breakpoint 1, PyArena_Free (arena=0x9a5120) at Python/pyarena.c:159
159         assert(arena);
(gdb) p arena->a_objects
$1 = ['f', 'squeamish ossifrage']
(gdb) bt
#0  PyArena_Free (arena=0x9a5120) at Python/pyarena.c:159
#1  0x0000000000425af5 in PyRun_FileExFlags (fp=0xa1b780, filename_str=0x7ffff7f37eb0 "docstr.py", start=257, globals=
    {'f': <function at remote 0x7ffff7f04058>, '__builtins__': <module at remote 0x7ffff7f6a358>, '__name__': '__main__', '__file__': 'docstr.py', '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='docstr.py') at remote 0x7ffff7ede608>, '__cached__': None, '__doc__': None}, locals=
    {'f': <function at remote 0x7ffff7f04058>, '__builtins__': <module at remote 0x7ffff7f6a358>, '__name__': '__main__', '__file__': 'docstr.py', '__package__': None, '__loader__': <SourceFileLoader(name='__main__', path='docstr.py') at remote 0x7ffff7ede608>, '__cached__': None, '__doc__': None}, closeit=1, flags=0x7fffffffe490) at Python/pythonrun.c:2114
#2  0x0000000000423a0c in PyRun_SimpleFileExFlags (fp=0xa1b780, filename=0x7ffff7f37eb0 "docstr.py", closeit=1, flags=
    0x7fffffffe490) at Python/pythonrun.c:1589
#3  0x000000000042289c in PyRun_AnyFileExFlags (fp=0xa1b780, filename=0x7ffff7f37eb0 "docstr.py", closeit=1, flags=0x7fffffffe490)
    at Python/pythonrun.c:1276
#4  0x000000000043bc83 in run_file (fp=0xa1b780, filename=0x9669b0 L"docstr.py", p_cf=0x7fffffffe490) at Modules/main.c:336
#5  0x000000000043c8c5 in Py_Main (argc=3, argv=0x964020) at Modules/main.c:780
#6  0x000000000041cdb5 in main (argc=3, argv=0x7fffffffe688) at ./Modules/python.c:69

So the string 'squeamish ossifrage' is still in arena->a_objects right until
end of PyRun_FileExFlags(), even with -OO.
History
Date User Action Args
2013-11-10 14:19:40skrahsetrecipients: + skrah, brett.cannon, r.david.murray, Sworddragon, serhiy.storchaka
2013-11-10 14:19:40skrahlinkissue19533 messages
2013-11-10 14:19:40skrahcreate