delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/02/04/10:58:10

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=pG3/CkXL+29VnEFd
78wWp5qZa9kswvWuoT86bQOBXmaD3n76A5c7eamvqxadsf5kaQxl+G7NqBLNcYfz
rPcsWiI0l8Q+QVSu8ZvKlgPztDxw4vWKRcxcHPWdDyClvhfJr4jrdB131NWfLYig
VtIQ3I/bkAzIaDDVviBaOrFucAw=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=1sq3ruUdCxXnjciVUezpSz
wmeK4=; b=oPG/mrpJ54fXoGQ6gLuZIyM5UGCcLpEZJj0gl3fs+DCziDpUD0yYRT
EV1Z5QN/7iM6Oy/nUKtS5hKCmciZgjnWCfjYI9taG3fw+8dCGTmh8zrt0TwtZuhz
eyCeMtjRstIb6s5gT2D0ita/cqxtYM+mEdTsV3aVQsszJkjxl65cs=
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.8 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_COUK,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2 spammy=stacey, Stacey, Hx-languages-length:1479, H*f:sk:ed80a1b
X-HELO: smtp-out-6.tiscali.co.uk
Subject: Re: cppcheck 1.77 Segmentation fault (64-bit)
To: cygwin AT cygwin DOT com
References: <CAK-n8j57fMX0fbwExi+4RmrKpX0W+0ujQaq=OWchwhTq2wBQxw AT mail DOT gmail DOT com> <1461736e-51a3-3bb3-cbaf-90b6d41548a1 AT tiscali DOT co DOT uk> <CAK-n8j4fu0QQ8-=1NYkGikWV5EMWBdkED7u9f50+w-tRLSabyw AT mail DOT gmail DOT com> <ed80a1b5-754f-09f1-614d-b84aaf4ec18b AT tiscali DOT co DOT uk>
From: David Stacey <drstacey AT tiscali DOT co DOT uk>
Message-ID: <37f6781d-8ce8-40bd-855a-bf5857bde55b@tiscali.co.uk>
Date: Sat, 4 Feb 2017 15:57:43 +0000
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <ed80a1b5-754f-09f1-614d-b84aaf4ec18b@tiscali.co.uk>
X-CMAE-Envelope: MS4wfKDkiQhMKPLb0ofKgK3WWvf3ymDuhc3w8FUp/9rws99bxZT5a9hYi0GJh3iuKLS+Ey4mUmy3mT3buxbknZs8eicq9OT5QbJZx9JSpfY4aSeCxPuJVzWP 7ThkRCN1F9DAUy7+Z2wZQ42PAv4hJ+PTjwqfV4Jig4FXUs0Vg9lMwuy4
X-IsSubscribed: yes

On 04/02/17 00:08, David Stacey wrote:
> On 29/01/17 21:04, Jim Reisert AD1C wrote:
>> Best as I can tell, the seg fault is due to having installed the test
>> version of gcc 6.0.  Even uninstalling gcc 6.0 does not fix the
>> problem.  I had to create an entirely new Cygwin-64 environment to get
>> past the problem.
>>
>> I invite you (Dave) to try the experiment yourself.  You would be wise
>> to back up your Cygwin environment before doing this.
>
> I've spent a little time looking into this. As per the stack track you 
> supplied, cppcheck is falling over constructing a std::istringstream 
> with a string passed in to initialise the stream. I'll need to debug 
> this into the STL to work out exactly why the seg fault is occurring.

I'm stuck here, I'm afraid. From what I can deduce, cppcheck is using 
the explicitly instantiated version of std::istringstream in libstdc++, 
but my gdb-foo isn't good enough to work out what's going on past that.

I've taken a good look at the cppcheck code, and I believe that it's 
using the STL correctly. If I'm being picky, cppcheck assumes that the 
std::istringsteam is going to construct successfully, i.e. there doesn't 
seem to be a 'catch' exception handler. But given the small size of the 
strings we're dealing with, it's not too unreasonable to expect the 
string copy to succeed.

Anyway, my assumption at the moment is that this is an issue with libstdc++.

Any thoughts?

Dave.


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