[Python-Dev] Does eval() leak? (original) (raw)

John Marshall John.Marshall at ec.gc.ca
Mon Feb 20 16:19:17 CET 2006


Martin v. Löwis wrote:

John Marshall wrote:

Should I expect the virtual memory allocation to go up if I do the following? python-dev is a list for discussing development of Python, not the development with Python. Please post this question to python-list at python.org. For python-dev, a message explaining where the memory leak is and how to correct it would be more appropriate. Most likely, there is no memory leak in eval.

My question was not a "development with Python" question. However, I posted to python-list as you said. Only one person responded to a request to test the provided code (~10 lines) which demonstrates a problem with eval()--he confirmed my observations. As the problem does exist for 2.3.5 which is the last 2.3 version still available at python.org, I would suggest people avoid using it if they do eval()s.

Unfortunately I, myself, cannot check into it more.

John



More information about the Python-Dev mailing list