Message49031
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. :-) |
|
Date |
User |
Action |
Args |
2007-08-23 15:44:33 | admin | link | issue1355913 messages |
2007-08-23 15:44:33 | admin | create | |
|