public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: David Stacey <drstacey@tiscali.co.uk>
To: cygwin@cygwin.com
Subject: Re: cppcheck 1.77 Segmentation fault (64-bit)
Date: Thu, 26 Jan 2017 22:21:00 -0000	[thread overview]
Message-ID: <1461736e-51a3-3bb3-cbaf-90b6d41548a1@tiscali.co.uk> (raw)
In-Reply-To: <CAK-n8j57fMX0fbwExi+4RmrKpX0W+0ujQaq=OWchwhTq2wBQxw@mail.gmail.com>

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

  reply	other threads:[~2017-01-26 22:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-26  2:57 Jim Reisert AD1C
2017-01-26 22:21 ` David Stacey [this message]
2017-01-29 21:04   ` Jim Reisert AD1C
2017-01-29 22:13     ` Christian Franke
2017-01-29 22:55       ` David Stacey
2017-02-04  0:08     ` David Stacey
2017-02-04 15:57       ` David Stacey
2017-02-08  6:20         ` Christian Franke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461736e-51a3-3bb3-cbaf-90b6d41548a1@tiscali.co.uk \
    --to=drstacey@tiscali.co.uk \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).