Sandboxing [Was Re: killing thread ?]

Paul Rubin phr-n2003b at
Sat Jan 25 01:58:44 CET 2003

"Terry Reedy" <tjreedy at> writes:
> > > Bastion ever protected you against "while 1: pass"
> Hmmm.  Disable 'while': force use of for loops, and limit list
> lengths, and recursion depth and ....

Recursion depth is already limited.  Normally you handle infinite
loops by having the interpreter count the bytecodes it executes,
and stop after some limit.

More information about the Python-list mailing list