From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27994 invoked by alias); 1 Dec 2011 01:47:02 -0000 Received: (qmail 27949 invoked by uid 22791); 1 Dec 2011 01:47:01 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-yw0-f43.google.com (HELO mail-yw0-f43.google.com) (209.85.213.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Dec 2011 01:46:46 +0000 Received: by ywt34 with SMTP id 34so1682666ywt.2 for ; Wed, 30 Nov 2011 17:46:45 -0800 (PST) Received: by 10.236.190.40 with SMTP id d28mr8284412yhn.92.1322704005546; Wed, 30 Nov 2011 17:46:45 -0800 (PST) Received: from [172.16.15.94] ([61.8.239.2]) by mx.google.com with ESMTPS id i4sm6706412yhk.21.2011.11.30.17.46.44 (version=SSLv3 cipher=OTHER); Wed, 30 Nov 2011 17:46:45 -0800 (PST) Message-ID: <4ED6DC83.5090006@gmail.com> Date: Thu, 01 Dec 2011 01:47:00 -0000 From: marco atzeri User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: 1.7.9-1 dll::init() still causing STATUS_ACCESS_VIOLATION errors References: <609C4401F424CD42A1FB3F9E26889B3E03E30E39E6@df-ex03.us.dataflux.com> In-Reply-To: <609C4401F424CD42A1FB3F9E26889B3E03E30E39E6@df-ex03.us.dataflux.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-12/txt/msg00000.txt.bz2 On 11/30/2011 9:33 PM, Jim Schneider wrote: > I updated today to 1.7.9-1 from an earlier install. Now, bash produces a series of dozens of exception lines like the following: > > 214713567 [main] bash 5368 exception::handle: Exception: STATUS_ACCESS_VIOLATION > 214714267 [main] bash 5368 open_stackdumpfile: Dumping stack trace to bash.exe.stackdump > > The contents of bash.exe.stackdump are: > > Exception: STATUS_ACCESS_VIOLATION at eip=6102048B > eax=00C40308 ebx=6124545C ecx=75110F81 edx=003C51F8 esi=00000000 edi=0028F9F4 > ebp=61020C00 esp=0028C7C4 program=C:\cygwin\bin\bash.exe, pid 1928, thread main > cs=0023 ds=002B es=002B fs=0053 gs=002B ss=002B > Stack trace: > Frame Function Args > End of stack trace > > The address 6102048B is associated with line 82 of winsup/cygwin/dll_init.cc, which is in dll::init(): > > /* Initialize an individual DLL */ > int > dll::init () > { > int ret = 1; > > /* This should be a no-op. Why didn't we just import this variable? */ > if (!p.envptr) > p.envptr =&__cygwin_environ; > else > *(p.envptr) = __cygwin_environ; /* This is line 82 */ > > /* Don't run constructors or the "main" if we've forked. */ > if (!in_forkee) > { > /* global contructors */ > p.run_ctors (); > > /* entry point of dll (use main of per_process with null args...) */ > if (p.main) > ret = p.main (0, 0, 0); > } > > return ret; > } > > The pointer p.envptr is tested before an attempt is made to use it, so it looks like it is getting garbage. Disassembling the function dll::init shows that the edx register is being used to hold the address. It's holding 003C51F8, just short of 240K before the base address of bash. > > If I manage to run it down, I'll send a patch. > I suggest to test a latest snapshot to see if the problem as been already solved, a lot of improvement are already in place for the future 1.7.10. Regards Marco -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple