delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/11/30/20:47:12

X-Recipient: archive-cygwin AT delorie DOT com
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
Message-ID: <4ED6DC83.5090006@gmail.com>
Date: Thu, 01 Dec 2011 02:46:43 +0100
From: marco atzeri <marco DOT atzeri AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: 1.7.9-1 dll::init() still causing STATUS_ACCESS_VIOLATION errors
References: <609C4401F424CD42A1FB3F9E26889B3E03E30E39E6 AT df-ex03 DOT us DOT dataflux DOT com>
In-Reply-To: <609C4401F424CD42A1FB3F9E26889B3E03E30E39E6@df-ex03.us.dataflux.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019