delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/07/30/14:48:59

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; q=dns; s=default; b=HJ
LzkvvLAEdHmphIXP+vw2Ivmh9l6JK+NETojn6Ec5ZcA7CQjZ9g/MXkxK9CpEDtt4
pLD0/k3untsZU2rwbZCGwvDB2cbHbQmdALCYzYwkx2BZFNw2enxLFQu8YVSHuWiO
sinml8Cq+K9JRLpMPr0DJZzgjYCeuPe1IeOhy88d4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:mime-version:in-reply-to:references:date
:message-id:subject:from:to:content-type; s=default; bh=v+Js+Lrc
NyGNU3JtezV6nLuGHZQ=; b=bIh9objojjfhXBmeLuaX3MLsruggt+NKGI5rsRxc
cgkNoyNS40Cdt52EjQ8I8HTwr8mg/k+1gCxWTehIh1Sz0z7lH6a9RtJL7KUc15ft
4oCLPUV43c8FY+SW2nvYH0th5e5Vv5LddOdoSckxiEYHVkZAOAsDYldQQ87bSHKM
VPI=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_40,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-la0-f66.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=DLU9Eu1r7rs/QITNVg4yvTlaC8DRXX0eF5mXUuWb0HA=; b=iivSiiZiYMjJp9+xwOYXLTyQqRzZ+tMX33CRFQawb09/Z62Tn2cQWQnYZRhfNqfpXk +ikQ8i/HfWbIGkiJHoDNLzovn/yoKs8s5uARMOjBT9CBatzza1/7BFJeOmfAafyQiKUZ 3nxEQejKK0gkXl2+zfdcpuOHR5Yblt29Fr7/TEWGRJ6S39lor5KlEg9tr5ZevujzCcFE vI+FiCbk0XAD+aQyraLtYlNvDDHXk5ZoQDgtNO6zwBH7H1hivNB8gF+o9EUuJOBv2q7c n0xNkFtDCD4WPTUwE/RCCgajAbUJyREA/OW3emJXVDqQygiGNFpzizK+JznzhsRl2W8B s9Sg==
X-Gm-Message-State: ALoCoQn5w1kXbVClUdiLfvHbMXaHNQGfve/o4rK3dY/YUC/o5iD4z12tUglOymHqrGPBpUdlAlnJ
MIME-Version: 1.0
X-Received: by 10.112.209.106 with SMTP id ml10mr45000323lbc.112.1438282118342; Thu, 30 Jul 2015 11:48:38 -0700 (PDT)
In-Reply-To: <CAOC2fq-ET7BmUQYOLXV_w_QMZE1rfZ8_JpJvVGF=nDS7gTaWWA@mail.gmail.com>
References: <CAOC2fq_fahjLapKbgO8Xer8neEjv1Ohs4bM3JOWcka0ajjcbCg AT mail DOT gmail DOT com> <55BA373A DOT 4020909 AT dronecode DOT org DOT uk> <CAOC2fq-ET7BmUQYOLXV_w_QMZE1rfZ8_JpJvVGF=nDS7gTaWWA AT mail DOT gmail DOT com>
Date: Thu, 30 Jul 2015 11:48:38 -0700
Message-ID: <CAOC2fq8oRqk7QhgEYjUF1Y-xzh-Df1C=0ON4LzTWoZJXrMxZ_g@mail.gmail.com>
Subject: Re: Analyzing a SEG FAULT that gdb doesn't help with
From: Michael Enright <mike AT kmcardiff DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

On Thu, Jul 30, 2015 at 10:46 AM, Michael Enright  wrote:
> On Thu, Jul 30, 2015 at 7:39 AM, Jon TURNEY  wrote:
>> You need to install the 'cygwin-debuginfo' package for debug symbols for
>> cygwin1.dll
>
> I missed this in my searches. I see now that I should have used the
> "debug" category.
>
>>
>> You also need to point addr2line at those detached debug symbols, as (unlike
>> gdb) it doesn't follow .gnu_debuglink pointers.
>>
>> (I'm assuming you've typoed 6155d363 here and it should be 0x6115D363 as the
>> strace output says)
>
> I've been having trouble getting that number right
>
>>
>> # addr2line -e /usr/lib/debug/usr/bin/cygwin1.dbg 0x6115D363
>> /usr/src/debug/cygwin-2.1.0-1/newlib/libc/machine/i386/strlen.S:64
>

So I set a breakpoint at that location. After hitting it a couple
dozen times I referred back to the stackdump for some register values.

I replaced the original breakpoint with b *0x6115D363 if $ecx==0
When that hit, I did a backtrace:

(gdb) bt
#0  strlen () at
/usr/src/debug/cygwin-2.1.0-1/newlib/libc/machine/i386/strlen.S:64
#1  0x6115bbc6 in __strftime (s=s AT entry=0x28c1c8
"(\274\a\200\300\t`\377\210\340`\377\001", maxsize=maxsize AT entry=100,
format=0x6e7e86da <js_Null_str+9683> "Z)",
    format AT entry=0x6e7e86d8 <js_Null_str+9681> "(%Z)",
tim_p=tim_p AT entry=0x28c0ec, era_info=era_info AT entry=0x28c078,
alt_digits=alt_digits AT entry=0x28c07c)
    at /usr/src/debug/cygwin-2.1.0-1/newlib/libc/time/strftime.c:1344
#2  0x6115d1bd in strftime (s=0x28c1c8
"(\274\a\200\300\t`\377\210\340`\377\001", maxsize=100,
format=0x6e7e86d8 <js_Null_str+9681> "(%Z)", tim_p=0x28c0ec)
    at /usr/src/debug/cygwin-2.1.0-1/newlib/libc/time/strftime.c:673
#3  0x610e9925 in _sigfe () at sigfe.s:38
#4  0x6e7e86d8 in js_Null_str () from /usr/bin/cygmozjs185-1.0.dll
#5  0x0028c0ec in ?? ()
#6  0x800392ec in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)

Then ...

(gdb) up
#1  0x6115bbc6 in __strftime (s=s AT entry=0x28c1c8
"(\274\a\200\300\t`\377\210\340`\377\001", maxsize=maxsize AT entry=100,
format=0x6e7e86da <js_Null_str+9683> "Z)",
    format AT entry=0x6e7e86d8 <js_Null_str+9681> "(%Z)",
tim_p=tim_p AT entry=0x28c0ec, era_info=era_info AT entry=0x28c078,
alt_digits=alt_digits AT entry=0x28c07c)
    at /usr/src/debug/cygwin-2.1.0-1/newlib/libc/time/strftime.c:1344
1344                  size = strlen (tznam);

Well, let's just kibitz myself:

(gdb) print tznam
$3 = 0xc07a4000 <error: Cannot access memory at address 0xc07a4000>
(gdb) list
1339                    tznam = _tzname[tim_p->tm_isdst > 0];
1340                  /* Note that in case of wcsftime this loop only works for
1341                     timezone abbreviations using the portable
codeset (aka ASCII).
1342                     This seems to be the case, but if that ever
changes, this
1343                     loop needs revisiting. */
1344                  size = strlen (tznam);
1345                  for (i = 0; i < size; i++)
1346                    {
1347                      if (count < maxsize - 1)
1348                        s[count++] = tznam[i];
(gdb) print _tzname
$4 = {0x800cfc48 "\200", <incomplete sequence \356\066>, 0x800cfc44 "PDT"}
(gdb) print _tzname[0]
$5 = 0x800cfc48 "\200", <incomplete sequence \356\066>
(gdb) print _tzname[1]
$6 = 0x800cfc44 "PDT"

So "something happened" when libmozjs tried to convert a time to a
string, and whatever happened has to do with the time zone.

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