Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Tue, 18 Jun 2002 12:00:03 -0400
From: Jason Tishler <jason@tishler.net>
Subject: Re: Rebase 1.5-1: Causes invalid page fault
In-reply-to: <20020618153547.16867.qmail@web21010.mail.yahoo.com>
To: Nicholas Wourms <nwourms@yahoo.com>
Cc: cygwin@cygwin.com
Mail-followup-to: Nicholas Wourms <nwourms@yahoo.com>, cygwin@cygwin.com
Message-id: <20020618160003.GH1568@tishler.net>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
User-Agent: Mutt/1.4i
References: <20020618143435.GG1568@tishler.net>
 <20020618153547.16867.qmail@web21010.mail.yahoo.com>

Nicholas,

On Tue, Jun 18, 2002 at 08:35:47AM -0700, Nicholas Wourms wrote:
> [SNIP]
> > 
> > Use gdb by setting a breakpoint ("b" command) at the call to
                                                  ^^^^^^^^^^^^^^
> > ReBaseImage() and then printing ("p" command) out the arguments.  Do
    ^^^^^^^^^^^^^
> > they look valid?
> 
> Hmm gdb wouldn't let me set a breakpoint on ReBaseImage (it says the
> symbol can't be found), so I just set it to line 58.

You *did* as I suggested -- sorry, if I was unclear.

> When I step through
> the execution, I discover that the pathname argument prints out to:
> "C:\\Cygnus\\cygwin\\bin\\cygXpm-noX4.dll\000???\030?\003x\000?...
                                           ^^^^

pathname is null terminated -- this is good.  Is it null terminated for
*all* DLLs?

> Is all that extra junk supposed to be tacked on?

pathname is defined as:

    char pathname[MAX_PATH + 1];

So, the "junk" is just the tail end of the character array.

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

