[pypy-dev] dead loop compilation

Armin Rigo arigo at tunes.org
Mon Jun 9 11:01:12 CEST 2008


Hi,

On Sat, Jun 07, 2008 at 04:30:51PM -0400, Yun Mao wrote:
> Hi, I was playing with pypy svn branch, and one of the first functions
> i tried was the following:
> 
> def f():
>    while 1: pass
> 
> it looks like pypy was trying to evaluate this and has gone dead too.
> Is this what I suppose to see? thanks,

We need a bit more context to know where you are trying to put this
code.  I tried to type it in a "pypy-c" executable -- is that what you
have in mind?

In "pypy-c" I can interrupt the infinite loop with Ctrl-C, which is what
I expected.  (To get this result you may need a "pypy-c" translated with
the '--allworkingmodules' option, otherwise I'm not sure signal handling
is enabled.)

If you mean that you tried to put an infinite loop in an RPython
function and translate that, then no chance.  The translation toolchain
is not really good with strange inputs: it only does something sane if
the input is sane (which means, an RPython that actually works and was
reasonably well tested first).


A bientot,

Armin



More information about the Pypy-dev mailing list