delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/07/21/12:34:23

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
X-Authentication-Warning: localhost.localdomain: ronald owned process doing -bs
Date: Mon, 21 Jul 2003 18:49:31 +0200 (CEST)
From: Ronald Landheer-Cieslak <ronald AT landheer DOT com>
X-X-Sender: ronald AT localhost DOT localdomain
To: cygwin AT cygwin DOT com
Subject: Re: Crash in lynx
In-Reply-To: <20030721154814.GQ1621@cygbert.vinschen.de>
Message-ID: <Pine.LNX.4.44.0307211836020.21656-100000@localhost.localdomain>
MIME-Version: 1.0

Hi Corinna,

> That's deep inside Windows.  Looks like a problem with requesting info
> from DNS, apparently.

Yeah, but the weird thing is that this is not the error I get when I run 
it outside of the debugger.

i.e., a STC shows that there is no problem with the call in question 
(gethostname) *unless* run from withing gdb.

Here's the code:

-- BEGIN STC --
#include <windows.h>

int main( void )
{
   char buffer[2000];

   gethostname( buffer, 2000 );
   printf( "host name: %s\n", buffer );

   return ( 0 );
}
--- END STC ---

When I save this as main.c and do a 
<BLIP>
$ make main CFLAGS=-g
gcc -g    main.c   -o main
$ ./main
host name: w2k-rlandheer
$ gdb ./main
...
(gdb) r
Starting program: /home/RLandheer/test/gethostname/main.exe 
warning: HEAP[main.exe]: 
warning: Heap block at 00252DC0 modified at 00252DAA past requested size 
of ffffffe2


Program received signal SIGTRAP, Trace/breakpoint trap.
0x78477705 in ?? ()

</BLIP>
This is regardless of whether I use canonical Cygwin 1.5.0 or current CVS 
Cygwin.The Lynx problem only occurs in current CVS Cygwin. (Hence, this is 
not the Lynx problem)

An oddity:
> warning: HEAP[main.exe]: 
> warning: Heap block at 00252DC0 modified at 00252DAA past requested size of ffffffe2

Anyways, this makes the Lynx problem very hard to debug, as I can't 
single-step through the code because that breaks the code..

Something interesting, though: gethostname is one of the auto-loaded 
functions which uses spiffy self-modifying assembler code. I have a 
feeling that might have something to do with this "can't step through 
code" problem, but that is just a WAG..

I'm going home, but if you have any ideas on how I can debug the Lynx 
problem without running into this SIGTRAP business I'm all ears. (i.e. 
I'll take a look tomorow during my coffee and/or lunchbreaks(s)

rlc

On Mon, 21 Jul 2003, Corinna Vinschen wrote:

> On Mon, Jul 21, 2003 at 03:45:51PM +0200, Ronald Landheer-Cieslak wrote:
> > A bit more info: I've just rebuilt cygwin1.dll and ran lynx under gdb. It 
> > crashed with a SIGTRAP. 
> > 
> > (gdb) bt
> > #0  0x78477705 in ?? ()
> > #1  0x784aed7c in ?? ()
> > #2  0x78496695 in ?? ()
> > #3  0x784958fe in ?? ()
> > #4  0x78487111 in ?? ()
> > #5  0x784abeda in ?? ()
> > #6  0x770c1a2f in RPCRT4!NdrXmitOrRepAsMarshall () from /cygdrive/c/WINNT/system32/rpcrt4.dll
> > #7  0x770d86b6 in RPCRT4!NdrClientInitialize () from /cygdrive/c/WINNT/system32/rpcrt4.dll
> > #8  0x770d0d8b in RPCRT4!NdrConformantArrayMarshall () from /cygdrive/c/WINNT/system32/rpcrt4.dll
> > #9  0x779788ac in DnsValidateUtf8Byte () from /cygdrive/c/WINNT/System32/dnsapi.dll
> > #10 0x770c96cb in RpcStringFreeW () from /cygdrive/c/WINNT/system32/rpcrt4.dll
> > #11 0x7712415e in RpcSsDontSerializeContext () from /cygdrive/c/WINNT/system32/rpcrt4.dll
> > #12 0x779794bf in DnsRecordStringForType () from /cygdrive/c/WINNT/System32/dnsapi.dll
> > #13 0x7797923a in DnsRecordStringForType () from /cygdrive/c/WINNT/System32/dnsapi.dll
> > #14 0x77979a6f in DnsRecordCopyEx () from /cygdrive/c/WINNT/System32/dnsapi.dll
> > #15 0x778334cf in RNR20!NSPStartup () from /cygdrive/c/WINNT/System32/RNR20.DLL
> 
> That's deep inside Windows.  Looks like a problem with requesting info
> from DNS, apparently.
> 
> Corinna
> 
> 


--
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 -


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