delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/01/26/17:21:20

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=V8bKLzBOfXzMGHFM
LHaeKSnKAgUfTHYlocSOwIMtYohjMfrVeoPX3kud43TZG50xF0KSK5ShzN6A5ocz
o2RVaKnPRQjEIpCLp+zmzWj6gpQmqvHmlj2YdALQbEM0WYuIkyZx6GM7EeK0CcLS
sJ8A/xIVk8sibuH3HLmc8sIk3WY=
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=wcxGhl4/x5xEOXL2/UrA0Y
Wy7gY=; b=vvxQbk8DJzxk6lkcKIqvkGYEf72LPzMLs75ZZpe/1Js1sZtBaKD6mE
Sw3rCB507InJW1OqxZZ8roMa0iFcmfmhitIl8n93LvsE8wGtM08Ykc7IqLHJU3EB
uHqfJc99mcZmfHXKTH98rMVRa7ZBnRHAmFz9zbuu7dF/RkO65bqbA=
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=-2.5 required=5.0 tests=AWL,BAYES_05,FREEMAIL_FROM,KAM_COUK,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=H*M:tiscali, H*i:4RmrKpX0W, H*f:sk:CAK-n8j, H*i:sk:OWchwhT
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>
From: David Stacey <drstacey AT tiscali DOT co DOT uk>
Message-ID: <1461736e-51a3-3bb3-cbaf-90b6d41548a1@tiscali.co.uk>
Date: Thu, 26 Jan 2017 22:20:54 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
MIME-Version: 1.0
In-Reply-To: <CAK-n8j57fMX0fbwExi+4RmrKpX0W+0ujQaq=OWchwhTq2wBQxw@mail.gmail.com>
X-CMAE-Envelope: MS4wfMft2SlbxnOLbwCsCtwJbl/IjTfslJkAPFkGK4a4nafagcGfz5XqVsFWl9nplR/z9n1OZantD2Q4ClXhtkwMECN68si68glU2Qexi2CT2lSn963tWlK1 v2jXCHBgLZBrd28hDPqj/vrjkBVQ98ybvtSwnxqKcWnfGZ1JENUoT7kH
X-IsSubscribed: yes

On 26/01/2017 02:56, Jim Reisert AD1C wrote:
> The latest version of cppcheck segment-faults.
>
> # cppcheck --enable=all -I include -I ../../library/include
> -I/usr/include/libxml2 \
>                      --suppressions-list=dx4wupd.check \
>                      --suppress=missingIncludeSystem --quiet \
>                      --template={file}:{line}:{severity}:{message}
> dx4wupd.cpp dx4wupdDlg.cpp

I'm sorry, but I can't reproduce this. I tested cppcheck on some of my 
own code before uploading the package (I have a some deliberately dodgy 
code samples for this very purpose) and it worked fine. I also run 
cppcheck's own testsuite as part of the build, and all of those tests 
passed.

Are you able to run really simple cppcheck commands, such as 'cppcheck 
--version' or 'cppcheck --help'?

If those work, what happens if you simplify the command line somewhat - 
say just scan one file, or omit the suppression switches, or omit the 
templates / include paths? Can you isolate one command line switch 
that's causing the crash?

If cppcheck still seg faults, can you send me a sample of code that 
exhibits the problem? If you don't want to post the source code to a 
public mailing list, you can e-mail a sample to me privately. Don't 
include your entire build tree, but try to cut it down to a small sample 
that still exhibits the problem.

> Stack trace:
> Frame        Function    Args
> 000FFFFBAA0  001004E27F3 (00000000000, 001801FC280, 00000000002, 00100509D10)
> 000FFFFBDB0  0010040229F (0030000000D, 000FFFFCC00, 000FFFFCA90, 000FFFFC9C0)
> 000FFFFCC00  00100405C31 (003E6FCF578, 003E6FCF578, 00000000008, 001005CFBE0)
> 000FFFFCC00  00100408ADC (001801441C9, 003E6F79950, 001802E5880, 001005CF790)
> 000FFFFCCC0  0010059E5FE (00180188C7A, 0018023BE00, 00180053801, 0000000002F)
> 000FFFFCCC0  00180047902 (00000000000, 00000000000, 00000000000, 00000000000)
> 00000000000  00180045693 (00000000000, 00000000000, 00000000000, 00000000000)
> 000FFFFFFF0  00180045744 (00000000000, 00000000000, 00000000000, 00000000000)
> End of stack trace

Thanks for including that, but sadly it's not as helpful as it might be. 
The stack trace shows the code going bang in the constructor of a 
std::basic_istream, but that doesn't really make sense (to me at least) 
in the context of the parent frame(s). It could be that there's some 
inlined code or a compiler generated function confusing me.

A couple of frames in and we're into cppcheck code. It's going over just 
after parsing the command line arguments - so I don't think it's even 
started looking at your code yet. With that in mind, I copied and pasted 
the exact same command you gave, and whilst it gave an error message (as 
I don't have your source files) it didn't crash.

So send me a sample of code that reproduces the problem, and I'll take 
another look.

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