> 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 depth, which just need
proper updating and conservative values. I also think that we need to
avoid allocating large arrays on the stack in recursive functions, and
always heap-allocate such memory, to be stack-conservative.

> I think it is a reasonable aim for 3.3 that Lib/test/crashers
> should be empty.

I agree. If you have patches to review, just put me on the nosy list.

Regards,
Martin
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to