Ken-Patrick Lehrmann
49b7ef84d9
Fix crashes in checkleakautovar (#2195)
Crashes found by daca@home
http://cppcheck1.osuosl.org:8000/crash.html
For instance
```
2019-09-20 16:27
ftp://ftp.se.debian.org/debian/pool/main/n/nedit/nedit_5.7.orig.tar.gz
cppcheck-options: -j1 --library=posix --library=gnu --library=motif -D__GNUC__ --check-library --inconclusive --enable=style,information --platform=unix64 --template=daca2 -rp=temp temp
platform: Linux-4.19.0-6-amd64-x86_64-with-debian-10.1
python: 2.7.16
client-version: 1.1.37
cppcheck: head 1.89
head-info: 38dec6a9a (2019-09-20 16:46:57 +0200)
count: Crash! 934
elapsed-time: -11.0 9.0
head results:
Checking temp/nedit-5.7/source/shell.c: __GNUC__=1...
Program received signal SIGSEGV, Segmentation fault.
0x000055555564b862 in CheckLeakAutoVar::ret (this=0x7fffffffb8c0, tok=0x5555582ea9e0, varInfo=...) at lib/token.h:340
340 return mImpl->mValueType;
#0 0x000055555564b862 in CheckLeakAutoVar::ret (this=0x7fffffffb8c0, tok=0x5555582ea9e0, varInfo=...) at lib/token.h:340
#1 0x0000555555651764 in CheckLeakAutoVar::check (this=0x7fffffffb8c0) at build/checkleakautovar.cpp:714
#2 0x0000555555652b37 in CheckLeakAutoVar::runChecks (this=<optimized out>, tokenizer=0x7fffffffc3a0, settings=<optimized out>, errorLogger=<optimized out>) at lib/checkleakautovar.h:108
#3 0x00005555556bc833 in CppCheck::checkNormalTokens (this=0x7fffffffce50, tokenizer=...) at build/cppcheck.cpp:732
#4 0x00005555556bf694 in CppCheck::checkFile (this=0x7fffffffce50, filename=..., cfgname=..., fileStream=...) at build/cppcheck.cpp:542
#5 0x00005555556c1cb8 in CppCheck::check (this=this@entry=0x7fffffffce50, path="temp/nedit-5.7/source/shell.c") at /usr/include/c++/8/bits/basic_string.h:936
#6 0x00005555557fd63f in CppCheckExecutor::check_internal (this=0x7fffffffdbd0, cppcheck=..., argv=<optimized out>) at cli/cppcheckexecutor.cpp:884
#7 0x00005555557fda92 in CppCheckExecutor::check (this=this@entry=0x7fffffffdbd0, argc=argc@entry=14, argv=argv@entry=0x7fffffffdf58) at cli/cppcheckexecutor.cpp:198
#8 0x00005555555e6358 in main (argc=14, argv=0x7fffffffdf58) at cli/main.cpp:95
DONE
```
2019-09-20 21:29:17 +02:00
..
2019-06-29 07:49:14 +02:00
2018-10-13 18:20:31 +02:00
2019-09-13 08:33:30 +02:00
2019-09-11 19:25:09 +02:00
2019-03-16 09:17:50 +01:00
2019-09-01 11:49:43 +02:00
2019-07-25 17:19:51 +02:00
2019-02-09 07:24:06 +01:00
2019-03-16 09:17:50 +01:00
2019-09-11 19:25:09 +02:00
2019-09-11 19:25:09 +02:00
2019-06-29 07:49:14 +02:00
2019-03-16 09:17:50 +01:00
2019-03-16 09:17:50 +01:00
2019-09-19 20:29:33 +02:00
2019-06-15 13:01:45 +02:00
2019-09-19 20:29:33 +02:00
2019-08-13 20:58:31 +02:00
2019-09-20 15:06:37 +02:00
2019-09-20 15:06:37 +02:00
2019-03-16 09:17:50 +01:00
2019-07-16 08:49:02 +02:00
2019-07-16 08:49:02 +02:00
2019-04-06 07:44:44 +02:00
2019-03-16 09:17:50 +01:00
2019-09-19 20:29:33 +02:00
2019-07-16 08:37:26 +02:00
2019-09-20 21:29:17 +02:00
2019-07-16 08:54:21 +02:00
2019-08-23 06:33:00 +02:00
2019-08-13 13:00:59 +02:00
2019-04-26 11:30:09 +02:00
2019-03-16 09:17:50 +01:00
2019-09-11 19:21:38 +02:00
2019-08-25 09:45:39 +02:00
2019-03-16 09:17:50 +01:00
2019-06-29 07:49:14 +02:00
2019-03-16 09:17:50 +01:00
2019-09-20 15:06:37 +02:00
2019-09-02 06:58:09 +02:00
2019-09-19 20:29:33 +02:00
2019-04-06 06:54:38 +02:00
2019-08-31 07:40:57 +02:00
2019-08-05 12:41:08 +02:00
2019-09-20 15:06:37 +02:00
2019-09-03 17:16:15 +02:00
2019-04-27 17:17:51 +02:00
2019-03-16 09:17:50 +01:00
2019-08-04 10:21:16 +02:00
2019-03-16 09:17:50 +01:00
2019-02-09 07:24:06 +01:00
2019-03-16 09:17:50 +01:00
2019-04-22 18:52:02 +02:00
2019-05-17 09:31:41 +02:00
2019-09-17 21:00:59 +02:00
2019-04-14 15:00:03 +02:00
2019-09-18 21:56:31 +02:00
2019-09-18 21:56:31 +02:00
2019-09-20 15:06:37 +02:00
2019-09-12 10:46:33 +02:00
2019-09-19 20:29:33 +02:00
2019-08-18 16:33:32 +02:00
2019-09-20 21:27:51 +02:00
2019-09-19 19:40:00 +02:00
2019-09-19 20:29:33 +02:00
2019-08-12 12:54:25 +02:00
2019-09-17 21:00:59 +02:00
2019-09-19 20:29:33 +02:00
2019-08-15 21:14:54 +02:00
2019-09-19 20:29:33 +02:00
2019-02-09 07:24:06 +01:00
2019-04-30 20:31:46 +02:00
2019-02-09 07:24:06 +01:00
2018-10-13 18:20:31 +02:00
2018-10-13 18:20:31 +02:00
2019-09-19 20:29:33 +02:00
2019-09-01 11:49:43 +02:00
2019-09-19 20:29:33 +02:00
2019-09-17 21:00:59 +02:00
2019-09-19 20:29:33 +02:00
2019-06-29 07:49:14 +02:00
2019-06-29 07:53:32 +02:00
2019-06-29 07:53:32 +02:00
2019-09-19 20:29:33 +02:00
2019-09-19 20:29:33 +02:00
2019-09-20 12:35:01 +02:00
2019-09-01 09:56:33 +02:00
2019-09-01 11:49:43 +02:00
2019-07-31 22:35:51 +02:00
2019-09-20 15:06:37 +02:00
2019-09-20 15:06:37 +02:00
2019-09-20 12:35:01 +02:00
2019-07-31 09:19:27 +02:00
2019-09-19 20:29:33 +02:00
2019-08-17 07:38:07 +02:00
2019-09-01 11:49:43 +02:00
2019-09-20 15:06:37 +02:00
2019-09-20 15:07:27 +02:00
2019-09-02 15:44:40 +02:00