cppcheck/test
Ken-Patrick Lehrmann 7a75aa084b Fix crash in CheckUninitVar (#2129)
http://cppcheck.osuosl.org:8000/ycmd
```
2019-08-30 23:21
ftp://ftp.se.debian.org/debian/pool/main/y/ycmd/ycmd_0+20181101+git600f54d.orig.tar.gz
cppcheck-options: -j1 --library=posix --library=gnu --library=qt --library=python --library=googletest --library=boost -D__GNUC__ --check-library --inconclusive --enable=style,information --platform=unix64 --template=daca2 -rp=temp temp
platform: Linux-4.15.0-58-generic-x86_64-with-Ubuntu-18.04-bionic
python: 2.7.15+
client-version: 1.1.31
cppcheck: head 1.88
count: Crash! 83
elapsed-time: -11.0 61.2
head results:
Checking temp/ycmd-0+20181101+git600f54d/ycmd/tests/clang/testdata/completion_fixit.cc: __GNUC__=1...

Program received signal SIGSEGV, Segmentation fault.
CheckUninitVar::valueFlowUninit (this=this@entry=0x7fffffffb350) at build/checkuninitvar.cpp:2376
2376	            if (!tok->variable())
 #0  CheckUninitVar::valueFlowUninit (this=this@entry=0x7fffffffb350) at build/checkuninitvar.cpp:2376
 #1  0x00005555556901ac in CheckUninitVar::runChecks (this=<optimized out>, tokenizer=0x7fffffffbcb0, settings=0x7fffffffcd10, errorLogger=<optimized out>) at lib/checkuninitvar.h:68
 #2  0x00005555556a2210 in CppCheck::checkNormalTokens (this=this@entry=0x7fffffffcaf0, tokenizer=...) at build/cppcheck.cpp:730
 #3  0x00005555556a6ee2 in CppCheck::checkFile (this=this@entry=0x7fffffffcaf0, filename="temp/ycmd-0+20181101+git600f54d/ycmd/tests/clang/testdata/completion_fixit.cc", cfgname="", fileStream=...) at build/cppcheck.cpp:540
 #4  0x00005555556aad4c in CppCheck::check (this=this@entry=0x7fffffffcaf0, path="temp/ycmd-0+20181101+git600f54d/ycmd/tests/clang/testdata/completion_fixit.cc") at build/cppcheck.cpp:195
 #5  0x00005555557ef167 in CppCheckExecutor::check_internal (this=this@entry=0x7fffffffd880, cppcheck=..., argv=argv@entry=0x7fffffffdc08) at cli/cppcheckexecutor.cpp:884
 #6  0x00005555557efa9a in CppCheckExecutor::check (this=0x7fffffffd880, argc=17, argv=0x7fffffffdc08) at cli/cppcheckexecutor.cpp:198
 #7  0x00005555555b1d1b in main (argc=17, argv=0x7fffffffdc08) at cli/main.cpp:95
```
2019-09-01 14:51:40 +02:00
..
cfg libcurl.cfg: Add library configuration for libcurl (#2120) 2019-08-29 15:11:59 +02:00
cli Fixed test/cli 2019-08-18 12:51:32 +02:00
synthetic Improve Python code 2017-06-05 13:23:00 +02:00
testsuites Typos found by running "codespell" (#1804) 2019-04-23 13:26:48 +02:00
CMakeLists.txt appveyor: check that cmake builds work also. run test/cli tests. 2019-07-09 07:46:53 +02:00
options.cpp Update Copyright 2019-06-29 07:49:14 +02:00
options.h Update Copyright 2019-06-29 07:49:14 +02:00
redirect.h Updated copyright year 2018-01-14 15:37:52 +01:00
test.cxx test: tabs to spaces, remove trailing spaces and extra empty lines at the end of files 2012-09-17 13:51:40 +02:00
test64bit.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testassert.cpp Moved CheckAssert::assertWithSideEffects to normal checking 2019-03-09 16:50:50 +01:00
testastutils.cpp Fix issue 9305: False positive uninitvar - struct initialized via function (#2123) 2019-08-30 18:32:45 +02:00
testautovariables.cpp Fix issue 9275: False positive: Non-local object uses local variable (#2084) 2019-08-14 20:09:33 +02:00
testbool.cpp Fix issue 9304: boolean type of ternary (#2131) 2019-09-01 09:51:53 +02:00
testboost.cpp CheckBoost: Use 'normal' checking 2019-03-09 20:00:31 +01:00
testbufferoverrun.cpp insecureCmdLineArgs: Added more test cases to ensure 'const'-qualifiers are handled correctly. 2019-08-15 08:45:31 +02:00
testcharvar.cpp Remove test case, ValueFlow will truncate and sign-extend values 2019-05-01 19:33:47 +02:00
testclass.cpp Fix false positive in initializationListUsage (#2128) 2019-08-31 12:27:07 +02:00
testcmdlineparser.cpp Convert SHOWTIME_MODES to enum class 2019-07-31 22:35:51 +02:00
testcondition.cpp Fix FP: Unitialized variable when using a pointer 2019-08-17 07:36:41 +02:00
testconstructors.cpp Run more tests on full token list (#2020) 2019-07-22 10:26:55 +02:00
testcppcheck.cpp Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +02:00
testerrorlogger.cpp Fixed #9260 (--template=gcc does not work correctly with -j) 2019-08-18 16:33:32 +02:00
testexceptionsafety.cpp Use 'normal' checking instead of 'simplified' 2019-03-16 07:19:48 +01:00
testfilelister.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testfunctions.cpp Fix false positive with ignoredReturnValue with std::move (#1809) 2019-04-26 12:22:31 +02:00
testgarbage.cpp template simplifier: fix syntax error false positive (an expression can't be a template) (#2115) 2019-08-27 06:37:58 +02:00
testimportproject.cpp testrunner: Fix assertion error 2019-08-17 15:12:49 +02:00
testincompletestatement.cpp astyle formatting 2019-05-21 10:43:33 +02:00
testinternal.cpp CheckInternal: Extend redundant null pointer check before Token::Match() (#1789) 2019-04-06 07:44:44 +02:00
testio.cpp Fix #8992: Add originalTypeToken to auto (#1701) 2019-02-27 06:44:31 +01:00
testleakautovar.cpp astyle formatting 2019-08-07 08:05:46 +02:00
testlibrary.cpp Refactoring: Convert enum Direction to enum class 2019-08-01 20:56:02 +02:00
testmathlib.cpp MathLib: Added robustness tests for 'MathLib::divide()'. 2019-05-25 23:06:50 +02:00
testmemleak.cpp leakNoReturnVar: Don't break early (#2095) 2019-08-23 06:33:00 +02:00
testnullpointer.cpp Add regression test for issue 9264: FP nullPointerRedundantCheck - pointer alias (#2133) 2019-09-01 09:58:53 +02:00
testoptions.cpp Allow multiple test case arguments to testrunner (#1755) 2019-03-26 20:28:40 +01:00
testother.cpp Try to make Travis happy 2019-08-25 10:24:13 +02:00
testpath.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testpathmatch.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testplatform.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testpostfixoperator.cpp Fixed #9042 (Another `using BOOL` type breach) (#1765) 2019-03-27 21:42:50 +01:00
testpreprocessor.cpp Removed casts 2019-07-16 09:14:44 +02:00
testrunner.cpp Update Copyright 2019-06-29 07:49:14 +02:00
testrunner.vcxproj Increase Windows stack size to 8M (#1998) 2019-07-15 12:39:58 +02:00
testrunner.vcxproj.filters Updated to Visual Studio 2019 2019-07-06 12:11:19 +02:00
testsamples.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testsimplifytemplate.cpp template simplifier: ignore friend templates (#2122) 2019-09-01 09:56:33 +02:00
testsimplifytokens.cpp Fix ternary operator simplification to accept template parameters. (#2048) 2019-07-28 21:52:52 +02:00
testsimplifytypedef.cpp Fix issue 9305: False positive uninitvar - struct initialized via function (#2123) 2019-08-30 18:32:45 +02:00
testsimplifyusing.cpp Partial fix for #9191 (simplifyTypedef: Problem when namespace is used) (#1952) 2019-07-06 20:22:13 +02:00
testsizeof.cpp sizeof: write inconclusive warning if calculation in sizeof is done indirectly by macro 2019-02-26 21:06:44 +01:00
teststl.cpp Fix issue 9202: False positive: std::array, size is a constant (#2132) 2019-09-01 09:44:34 +02:00
teststring.cpp Re-enable valueFlowSubFunction (#2063) 2019-08-05 16:26:32 +02:00
testsuite.cpp Fixed Cppcheck shadowVar warnings 2019-04-30 21:01:18 +02:00
testsuite.h Add help to testrunner (#1704) 2019-03-02 08:06:23 +01:00
testsuppressions.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testsymboldatabase.cpp Issue 9255: Prevent infinite recursion in parsedecl (#2134) 2019-09-01 11:36:02 +02:00
testthreadexecutor.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtimer.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtoken.cpp Try to fix Cppcheck warning to make Cppcheck happy 2019-08-02 07:57:34 +02:00
testtokenize.cpp Fixed #9286 (FP: syntax error: { .abc.a = 1) 2019-08-20 13:56:38 +02:00
testtokenlist.cpp Update copyright year 2019-02-09 07:24:06 +01:00
testtype.cpp Fix issue 9306: Adjust shiftTooManyBitsSigned for C++14 (#2127) 2019-08-31 07:40:57 +02:00
testuninitvar.cpp Fix crash in CheckUninitVar (#2129) 2019-09-01 14:51:40 +02:00
testunusedfunctions.cpp fixed tests, unused templates are removed by default 2019-05-05 19:40:58 +02:00
testunusedprivfunc.cpp Run more tests on full token list (#2020) 2019-07-22 10:26:55 +02:00
testunusedvar.cpp Fixed #9234 (FP unreadVariable - assignment via iterator) 2019-08-04 10:21:16 +02:00
testutils.h Refactoring: Rename variables. Do not use leading _. Renamed 'col' to 'column' 2019-08-18 12:19:05 +02:00
testvaarg.cpp Disable all simplified checks 2019-03-16 09:17:50 +01:00
testvalueflow.cpp Fix issue 8715: regression uninitvar not detected (#2092) 2019-08-16 07:48:54 +02:00
testvarid.cpp token simplifier: fix namespace, token link and syntax error support for template type aliases (#1863) 2019-06-01 10:52:29 +02:00