Mail Archives: cygwin/2005/09/08/10:00:40
On Thu, 8 Sep 2005, Julian Hall wrote:
> Hi,
>
> I'm compiling a library I've had working as a static library for a while
> into a dll using 'g++ -mno-cygwin'. The compile works fine, and I'm
> able to link an app to it, but the app crashes with the message
> 'Application failed to initialize (C0000005)'. I've tried single
> stepping, but in order to get anywhere I've had to set a breakpoint on
> the DLL entry point '*0x10010000' and use 'stepi' through the
> instructions I don't have debug information for. The crash is happening
> within a call to AddAtomA from the function __w32_sharedptr_set. The
> last few instructions to execute are:
>
> 10016c96: 89 45 e0 mov %eax,0xffffffe0(%ebp)
> 10016c99: a1 8c 5a 02 10 mov 0x10025a8c,%eax
> 10016c9e: 89 45 e4 mov %eax,0xffffffe4(%ebp)
> 10016ca1: a1 90 5a 02 10 mov 0x10025a90,%eax
> 10016ca6: 89 45 e8 mov %eax,0xffffffe8(%ebp)
> 10016ca9: a1 94 5a 02 10 mov 0x10025a94,%eax
> 10016cae: 89 45 ec mov %eax,0xffffffec(%ebp)
> 10016cb1: a1 98 5a 02 10 mov 0x10025a98,%eax
> 10016cb6: 89 45 f0 mov %eax,0xfffffff0(%ebp)
> 10016cb9: a1 9c 5a 02 10 mov 0x10025a9c,%eax
> 10016cbe: 89 45 f4 mov %eax,0xfffffff4(%ebp)
> 10016cc1: 8d 45 b8 lea 0xffffffb8(%ebp),%eax
> 10016cc4: 89 04 24 mov %eax,(%esp)
> 10016cc7: e8 34 10 00 00 call 10017d00 <_AddAtomA AT 4>
>
> Does anyone have any idea what might be causing this failure? As far as
> I can tell, all of this is happening *before* msvcrt.dll initialises;
> could that be the problem? If so, how do I ensure that msvcrt.dll
> initialises first?
The fact that you're using -mno-cygwin puts you in MinGW land. Cygwin gcc
provides a MinGW cross-target as a convenience, but all questions about
the usage of -mno-cygwin should go to the MinGW-users list.
HTH,
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
If there's any real truth it's that the entire multidimensional infinity
of the Universe is almost certainly being run by a bunch of maniacs. /DA
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -