This is the mail archive of the cygwin-apps@cygwin.com 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]

RE: get windows error message 0xc0000142 on starting cygwin app


< On Wed, Sep 19, 2001 at 04:53:09PM +0200, Ralf Habacker wrote:
> >> No, I mean that an instruction that manipulates the stack results in an
> >> error.  That indicates to me that the stack pointer is screwed up.
> >>
> >But that would be code in the ntdll.dll or kernel32.dll ? But as I understand
> >does this code uses the stack of the current process, that is for
> example bash
> >or ssp or gdb, isn't it ?
>
> If you don't think it's the stack pointer, you can verify the issue very
> quickly.  Inspect it in gdb.
>
> (gdb) info reg $esp
> (gdb) x/20x $esp
>
Can you tell me to which adress the stack is be set on starting a new app ?

> >2.  objdump shows that ld by default reserves about 2MB for the dll and
> >exe stack.  Isn't this enough ?
>
> Who knows?  This depends on the application.  Have you tried setting the
> stack size to something larger?  You'd probably have to add a
>
> -Wl,--stack,4194304
>
> to your gcc linker line.
>
This does make no difference.

By the way: How does the process loader calculate the reserved stack size for
the newly started app. Does he takes on of the entry in the executable or dll
below ?

SizeOfStackReserve      00200000 (a)
SizeOfStackCommit       00001000
SizeOfHeapReserve       00100000 b)
SizeOfHeapCommit        00001000

(I have changed the value (as) and (b) but the taskmanager tells no difference.)

> >3.  Do you know where I can find informations (online docu) about the
> >pe format ?  I have recognized some differences in the header like a
> >native win32 app and a ld produced app.  For example the "Subsystem"
> >field differs.  Perhaps this is a relocation problem.  Do you know any
> >way to verify this guess ?
>
> There must be a lot of documentation in Microsoft's MSDN:
>
> http://msdn.microsoft.com/library/default.asp
>
Thanks. I have found the infos.
> cgf
>


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