Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <431FEDBA.1060204@meridiandigital.co.uk> Date: Thu, 08 Sep 2005 08:52:26 +0100 From: Julian Hall User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Strange crash in -mno-cygwin DLL Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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? -- 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/