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 pitrou
Recipients benjamin.peterson, brett.cannon, dalke, georg.brandl, ncoghlan, pitrou
Date 2014-05-22.18:34:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1400783688.54.0.951243019875.issue21523@psf.upfronthosting.co.za>
In-reply-to
Content
You're right, CPU time is burnt by stackdepth_walk().
The underlying issue is that max stacksize is computed a bit pessimistically with the new opcodes (JUMP_IF_{TRUE,FALSE}_OR_POP). On normal functions there wouldn't be a sizable difference, but on pathological cases such as yours, a code object could end up claiming a large stack size (as large of the number of such opcodes) rather than a very small number.

Still, of course, stackdepth_walk() should not blow up when computing a large stack size, but fixing the opcode's stack effect in compile.c seems to fix the issue anyway.
History
Date User Action Args
2014-05-22 18:34:48pitrousetrecipients: + pitrou, brett.cannon, georg.brandl, dalke, ncoghlan, benjamin.peterson
2014-05-22 18:34:48pitrousetmessageid: <1400783688.54.0.951243019875.issue21523@psf.upfronthosting.co.za>
2014-05-22 18:34:48pitroulinkissue21523 messages
2014-05-22 18:34:47pitroucreate