homepage

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 nnorwitz
Recipients
Date 2005年11月15日.04:43:20
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=33168
Oh, so close, I'm sorry, I see one more problem. :-)
Thomas, I hope you will write up this experience in coding
this patch. IMO it clearly demonstrates a problem with the
new AST code that needs to be addressed. ie, Memory
management is not possible to get right. I've got a 700+
line patch to ast.c to correct many more memory issues
(hopefully that won't cause conflicts with this patch). I
would like to hear ideas of how the AST code can be improved
to make it much easier to not leak memory and be safe at the
same time.
The problem is that handlers is not an asdl_seq of stmt's,
but rather an asdl_seq of exceptionhandlers. There is no
utility function to clean out this seq, so you need to do it
manually.
for (i = 0; i < asdl_seq_LEN(handlers); i++)
 free_exceptionhandler(asdl_seq_GET(handlers, i));
asdl_seq_free(handlers);
I don't see any other problems, but perhaps I will when it
gets checked in or I run valgrind on it.
The Other Nick :-)
History
Date User Action Args
2007年08月23日 15:44:32adminlinkissue1355913 messages
2007年08月23日 15:44:32admincreate

AltStyle によって変換されたページ (->オリジナル) /