[pypy-dev] pypy's windows buildbot

Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Dec 19 17:50:04 CET 2008


Maciej Fijalkowski  wrote:
> > pypy-c -S
> >>>> import site
> > [...]
> > RuntimeError: internal error: <RuntimeError object at 0x18f687c>
>
> right, that's a known issue that you cannot do a debug build without
> -O2 at least. I suppose we need to adapt makefiles and such (it sucks,
> doesn't it?).
>
> The reason for that is that we have tons of local vars which are
> temporary and go into registers (but by default, without any
> optimisations, compiler does not remove them from stack space)

I suggest to modify the compiler options in pypy.translator.platform,
on windows first.

- use the /STACK linker option to reserve a stack large enough for
pypy (this affects only .exe, not dlls)
- set the MAX_STACK_SIZE preprocessor symbol used in by
LL_stack_too_big() in src/stack.h,
to a value slightly lower than the one above.

For optimized build, stacksize=512Kb is enough (this is the default
value in src/stack.h)
For debug build stacksize=4Mb works on win32.

I don't know the gcc options very well.
What do you think of adding these two:
        "-DMAX_STACK_SIZE=%d" % (stacksize - 1024)
        "-Wl,--stack,%d" % stacksize

-- 
Amaury Forgeot d'Arc



More information about the Pypy-dev mailing list