delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/01/07/20:09:31

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=0.7 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_NUMERIC_HELO,SPF_HELO_PASS,T_RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL
X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: nyc4bos AT aol DOT com
Subject: Re: New version of w3m 0.5.2 Crashes - GDB help needed (SOLVED)
Date: Fri, 07 Jan 2011 20:09:20 -0500
Lines: 85
Message-ID: <81wrmg42wv.fsf_-_@aol.com>
References: <461v5l46ht DOT fsf AT aol DOT com> <AANLkTimCHO=nJhnSuZDwkkRAH24Fq6vDZbJCothHX1zD AT mail DOT gmail DOT com> <81wrnaad66 DOT fsf AT aol DOT com> <AANLkTintjW8ckzp54shjmc+yQ7y-5Ev6Ap4q_qb8Xgg6 AT mail DOT gmail DOT com> <AANLkTikPoADsgJ2w2PAUdF1Wv5G+gUgRAs6yutTrXf7F AT mail DOT gmail DOT com> <46wrn4vv0i DOT fsf AT aol DOT com> <4662u3aw5m DOT fsf_-_ AT aol DOT com> <20110105212218 DOT GA21238 AT ednor DOT casa DOT cgf DOT cx> <AANLkTi=JN2w_Q3yz29GMo2trvH--aG9PES2pn9fXwZtY AT mail DOT gmail DOT com> <46d3o9lfut DOT fsf AT aol DOT com>
Mime-Version: 1.0
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (windows-nt)
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

nyc4bos AT aol DOT com writes:

> Bob Heckel <bheckel AT gmail DOT com> writes:
>
>> On Wed, Jan 5, 2011 at 16:22, Christopher Faylor wrote:
>>> On Wed, Jan 05, 2011 at 04:16:37PM -0500, nyc4bosaol.com wrote:
>>>>nyc4bosaol.com writes:
>>>>
>>>>Bob created a debug version of w3m for me.
>>>>
>>>>Here's what I see:
>>>>
>>>>The crash occurs when doin a `strncmp' in cygwin1.dll:
>>>>
>>>>      4 [main] w3m 3024 exception::handle: Exception: STATUS_ACCESS_VIOLATION
>>>>   1564 [main] w3m 3024 open_stackdumpfile: Dumping stack trace to w3m.exe.stack
>>>>dump
>>>>
>>>>Program received signal SIGSEGV, Segmentation fault.
>>>>0x6110daf5 in strncmp () from /usr/bin/cygwin1.dll
>>>>(gdb) bt full
>>>>#0  0x6110daf5 in strncmp () from /usr/bin/cygwin1.dll
>>>>No symbol table info available.
>>>>#1  0x7c85ada0 in OutputDebugStringA ()
>>>>   from /cygdrive/c/WINDOWS/system32/kernel32.dll
>>>>No symbol table info available.
>>>>#2  0x40010006 in ?? ()
>>>>No symbol table info available.
>>>>#3  0x00000000 in ?? ()
>>>>No symbol table info available.
>>>>(gdb)
>>>
>>> Looks to me like you need a debugging version of w3m with symbols.
>>> You need to find out what's being passed to strncmp, possibly by setting a
>>> breakpoint at 0x40110006.
>
> Do you mean 0x40010006 ?
>
>>
>> If I did it right, this one includes the symbols:
>> http://bheckel.sdf.org/cygwin/w3m/tmp/w3mdebug.tar.bz2
>
> What debugging parameters did you pass it?
>
> Did you pass:
>
>     -g
>
> for ALL of the .c files?
>
> For instance, charset.c doesn't seem to be compiled debuggable.
>
> I didn't see a config.log so all of that extra stuff must be
> on your system.
>
> Thanks for your help.

OK, I debugged the new w3m/0.5.2 and discovered what the problem was.

It appears that it crashes if LANG is not defined

When function term.c:check_cygwin_console:239 is called and
the following is evaluated with environment variable LANG undefined:

	if (strncmp(getenv("LANG"), "ja", 2) == 0) {
	    isWinConsole = TERM_CYGWIN_RESERVE_IME;
	}

w3m crashes:

Setting LANG to any value prevents the crash.

Can w3m be changed so that it wont crash in this instance?

The previous version of w3m/0.5.1 doesn't crash if LANG is not set.

BTW, where, when and how does Cygwin set the LANG environment variable?

Thanks.



>
>>
>> Bob


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