From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 97891 invoked by alias); 4 Feb 2017 15:57:55 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 97878 invoked by uid 89); 4 Feb 2017 15:57:53 -0000 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 Received: from smtp-out-6.tiscali.co.uk (HELO smtp-out-6.tiscali.co.uk) (62.24.135.134) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 04 Feb 2017 15:57:51 +0000 Received: from [10.7.7.26] ([88.150.206.166]) by smtp.talktalk.net with SMTP id a2idcjW4X3OBfa2ijc9OrH; Sat, 04 Feb 2017 15:57:49 +0000 Subject: Re: cppcheck 1.77 Segmentation fault (64-bit) To: cygwin@cygwin.com References: <1461736e-51a3-3bb3-cbaf-90b6d41548a1@tiscali.co.uk> From: David Stacey Message-ID: <37f6781d-8ce8-40bd-855a-bf5857bde55b@tiscali.co.uk> Date: Sat, 04 Feb 2017 15:57:00 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfKDkiQhMKPLb0ofKgK3WWvf3ymDuhc3w8FUp/9rws99bxZT5a9hYi0GJh3iuKLS+Ey4mUmy3mT3buxbknZs8eicq9OT5QbJZx9JSpfY4aSeCxPuJVzWP 7ThkRCN1F9DAUy7+Z2wZQ42PAv4hJ+PTjwqfV4Jig4FXUs0Vg9lMwuy4 X-IsSubscribed: yes X-SW-Source: 2017-02/txt/msg00057.txt.bz2 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