This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ATTN MAINTAINER] python


On Mar  4 07:06, Achim Gratz wrote:
> Corinna Vinschen writes:
> >> Increasing the stack reserve size of the python executable to 0x400000
> >> on 32bit and 0x800000 on 64bit avoids the SEGV.  I'm not sure if this
> >> indicates an error in Python itself or simply a too restricted
> >> configuration.
> >
> > Maybe it just needs a really big stack? 
> 
> Obviously it wants something larger than it is compiled with (what
> exactly does "stack reserve" mean, btw?)â  The backtrace had something
> like 5000 of the same call inside compile.c in it.  But I would have
> expected it to grow the stack when necessary or give some intelligible
> error instead of simply segfault.

The problem here is how the Windows stack works.  "Stack reserve" is the
initial size of the reserved virtual memory space used for the stack of
the main thread.  By default that's 2 Megs.

However, the stack for the main thread has a problem.  The way a new
process is created, the main thread stack is jammed between certain
other datastructures, in the address space from 0x30000 and 0x230000.
Since the stack is growing top-down, there's nothing a process can do
when the reserved stack space is exhausted.  Except generating an
exception STATUS_STACK_OVERFLOW.  And then... what?  There's no way to
reserve more space below 0x30000 and even *if* it would be possible, it's
only a mere 192K.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Attachment: pgpRdkmymYZDo.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]