#gdbcppcheck(gdb)r--enable=all--std=c++11--library=qtcrash.cppStartingprogram:/usr/bin/cppcheck--enable=all--std=c++11--library=qtcrash.cpp[Thread debugging using libthread_db enabled]Usinghostlibthread_dblibrary"/usr/lib/libthread_db.so.1".Checkingcrash.cpp...crash.cpp:12:27:style:Variable'range'isassignedavaluethatisneverused.[unreadVariable]QPair<int,int>range=v.value<QPair<int,int>>();^ProgramreceivedsignalSIGSEGV,Segmentationfault.0x000055555583562binToken::linkAt(int)const()(gdb)bt#00x000055555583562binToken::linkAt(int)const()#10x000055555571737dinCheckUnusedFunctions::parseTokens(Tokenizerconst&,charconst*,Settingsconst*)()#20x000055555571871cinCheckUnusedFunctions::getFileInfo(Tokenizerconst*,Settingsconst*)const()#30x00005555557406edinCppCheck::checkNormalTokens(Tokenizerconst&)()#40x000055555574b859inCppCheck::checkFile(std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>const&,std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>const&,std::istream&)()#50x000055555574cd05inCppCheck::check(std::__cxx11::basic_string<char,std::char_traits<char>,std::allocator<char>>const&)()#60x000055555561080binCppCheckExecutor::check_internal(CppCheck&,int,charconst*const*)()#70x0000555555610cb1inCppCheckExecutor::check(int,charconst*const*)()#80x00005555555f9c70inmain()(gdb)
Last edit: Haddayn 2021-10-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I can't confirm crash for this case, but there is an internal error. Here is output on the both examples for cppcheck from main branch (commit 27d7609d):
Hey there.
Cppcheck 2.6 crashes where cppcheck 2.5 does not
By removing as much lines as possible, I ended up with this:
Last edit: Haddayn 2021-10-06
Managed to trim it a little bit more:
Reduced parameters to the following:
Last edit: Haddayn 2021-10-06
Could someone please file a ticket? Or is there already a ticket for this?
I can't confirm crash for this case, but there is an internal error. Here is output on the both examples for cppcheck from main branch (commit 27d7609d):
Ticket is here: https://trac.cppcheck.net/ticket/10552