Python 2.0 and Stackless

Jeremy Hylton jeremy at alum.mit.edu
Sun Aug 6 15:14:27 EDT 2000


In article <m3k8dvquvh.fsf at atrus.jesus.cam.ac.uk>,
  Michael Hudson <mwh21 at cam.ac.uk> wrote:
> "Jeff Petkau" <jpet at eskimo.com> writes:
>
> > For normal Python programs (that don't use stackless or uthreads),
> > the *only* effect of the stackless patch is to make Python faster
> > and more crash-resistant (since you can't overflow the C stack).
>
> Hmm, only "sort-of".  I mean, yes, you won't overflow the C stack, but
> unbounded recursion is still a bug; with stackless you'll just sit
> there allocating frames until you chew through all available VM and
> then bomb out with a MemoryError (and spend about a day printing the
> traceback) - or segfault (Python isn't brilliant in low memory
> situations).

A friend of mine implemented a Java VM that did not use the C stack.
It was a hassle for his company to pass the standard stress test suite
for JVMs, because one of the tests verified that unbounded recursion
didn't crash the JVM.  In his case, the test didn't crash, but it did
run until the machine was out of swap. :-).

Jeremy


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list