This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cppcheck 1.77 Segmentation fault (64-bit)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]