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月16日.05:38:46
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=33168
ISTM there are a couple of problems. Some of these were
likely in there before and I may have told you to do some.
:-( I probably made the same error too. :-( :-(
One is a new one though. That starts in the for loop. You
break in there, but that only breaks out of the for loop,
doesn't it? So you really need a goto to break out I think.
After setting except_st, it holds references to body,
handlers, and orelse, so if you free except_st, it should
free all the others. Therefore if except_st was created
(after the if (except_st) break;), you should set body =
handlers = orelse = NULL; Do you agree? I think if you
don't you will get a double free.
The same would go for after you asdl_seq_SET(inner, 0,
except_st); you should set except_st = NULL;
OTOH, you fixed a memory leak. Whenever one does return
TryExcept(); (or any other similar AST call), if TryExcept
fails, we will return NULL and all the local variables will
be leaked.
*sigh* Sorry you have to deal with this crap. You've been
a very good guinea pig being the first. I really hope we do
the arenas as discussed on python-dev. If you aren't too
burnt out, it would be a really good way to learn the rest
of the AST. :-)
History
Date User Action Args
2007年08月23日 15:44:33adminlinkissue1355913 messages
2007年08月23日 15:44:33admincreate

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