Re: [Python-Dev] Defending against stack overflow (was Sandboxing Python)

2012-03-04 Thread Maciej Fijalkowski
On Sun, Mar 4, 2012 at 12:35 PM, "Martin v. Löwis" wrote: >> So, how to handle stack overflows (of the C stack)? >> To prevent a stack overflow an exception must be raised before >> the VM runs out C stack. To do this we need 2 pieces of info: >> a) How much stack we've used >> b) How much stack i

Re: [Python-Dev] Defending against stack overflow (was Sandboxing Python)

2012-03-04 Thread Martin v. Löwis
> So, how to handle stack overflows (of the C stack)? > To prevent a stack overflow an exception must be raised before > the VM runs out C stack. To do this we need 2 pieces of info: > a) How much stack we've used > b) How much stack is available. Python has already dedicated counters for stack de