Commit Graph

77 Commits

Author SHA1 Message Date
Daniel Marjamäki ea57f2b820 Memory leaks : Handle assignments better - bug 2395524 2008-12-07 07:32:02 +00:00
Daniel Marjamäki 7c32b7b2bb Memory leaks: Better handling of "realloc". Fixing bug [ 2395262 ] 2008-12-06 13:33:22 +00:00
Daniel Marjamäki a8bf4d7e77 Memory leak: Refactoring and improvements of simplifycode etc 2008-12-01 18:52:40 +00:00
Daniel Marjamäki e968b42c38 Memory leaks: When "--debug" is given the checking will be different to
highlight problems in "getcode" and "simplifycode"
2008-12-01 07:50:36 +00:00
Daniel Marjamäki a7ece61734 Memory leak: The "do" must be handled differently. Made a first fix for it 2008-11-30 19:00:07 +00:00
Daniel Marjamäki f646684159 Memory leak: Fixed the test 'CheckMemoryLeak::func8' 2008-11-29 17:34:47 +00:00
Daniel Marjamäki 8c07a13cb6 Test Memory leak: Added a test case, currently a false positive is generated 2008-11-29 16:42:14 +00:00
Daniel Marjamäki 95c7e1a7d3 Memory leak: Moved the class member checking to the "--all" 2008-11-28 17:16:28 +00:00
Daniel Marjamäki 6fcbbf21ee Memory leaks: Reverted the sensitive checking in r536. And improved the
simplifycode function.
2008-11-27 07:27:50 +00:00
Daniel Marjamäki 997f4e6165 Memory leaks: Made the checking a lot more sensitive 2008-11-26 18:13:36 +00:00
Daniel Marjamäki c95fee7266 testmemleak: Added 'func7' test case. Not working yet 2008-11-26 07:17:50 +00:00
Daniel Marjamäki 4f4a2391e0 Refactoring: Removed _settings member from the Tokenizer 2008-11-25 18:44:35 +00:00
Daniel Marjamäki 8845e8bc89 Refactoring: Tokenizer - renaming functions, moved the 'tokenizeCode' to the private section 2008-11-25 18:34:51 +00:00
Reijo Tomperi 29a1468523 Refactoring: Renamed some member variables: variable -> _variable 2008-11-23 11:08:07 +00:00
Daniel Marjamäki 0c9784fc0c Refactoring: The Tokenizer::FillFunctionList has no use of its parameter. Enabled the CheckFunctionUsage 2008-11-23 06:21:44 +00:00
Daniel Marjamäki 0d3a99adb0 increased constness of member variable _tokenizer in the Check* classes 2008-11-22 20:00:36 +00:00
Daniel Marjamäki 07b5ebe72b Check Function Usage: Removed much of the old checking and made some refactoring 2008-11-22 19:39:12 +00:00
Daniel Marjamäki e33985dbf0 Memory leak: Handle conditions that are always true / false 2008-11-22 11:30:50 +00:00
Daniel Marjamäki 2db69e6072 tokenizer: Added DeallocateTokens to the destructor so it's not necessary to cleanup manually 2008-11-22 09:44:02 +00:00
Reijo Tomperi 125692bc65 Refactoring: CommonCheck.* files are removed. Rest of the global functions from there were moved to Tokenizer class 2008-11-21 21:14:24 +00:00
Daniel Marjamäki a82b46dad6 Memory leak: Better handling when calling functions 2008-11-21 18:02:20 +00:00
Reijo Tomperi 51e9d98a5f Refactoring: Errors are no longer logged via global functions to a global stream. Instead callback function is used via interface.
ErrorLogger interface was added and taken into use.
2008-11-20 22:19:26 +00:00
Daniel Marjamäki 7a048cf35e Memory leak: Readded some checks that were removed in r481 2008-11-19 18:46:28 +00:00
Daniel Marjamäki 452ada698e Memory leak: Moved false positive to "--all" upon some special case conditions (bug 2313129) 2008-11-19 17:46:09 +00:00
Daniel Marjamäki 2018c25d20 Memory leak: moved simplifyTokens rule to '--all' 2008-11-17 17:31:07 +00:00
Daniel Marjamäki 7e8b3c86f6 Memory leak: Better handling of 'if (0 != p)' 2008-11-17 17:02:06 +00:00
Daniel Marjamäki 15b5d0abc7 testmemleak: Removed old TODO 2008-11-16 17:29:52 +00:00
Reijo Tomperi ce08224547 Few static variables are now private members. ShowAll etc. global variables are now members of Settings class and given as a
parameter to the classes that need them.
2008-11-16 15:18:50 +00:00
Daniel Marjamäki 2ecb805283 Memory leak: Mismatching allocation and deallocation in subfunction 2008-11-16 13:55:16 +00:00
Daniel Marjamäki 8dab130d3e Memory leak: Added a simple test case 2008-11-16 07:33:28 +00:00
Daniel Marjamäki d5d2f0671c Memory leak: reverted most of change 461. 2008-11-16 06:34:22 +00:00
Daniel Marjamäki d11e93f475 Memory leak: Added test case that failed. And fixed it. 2008-11-16 05:57:41 +00:00
Reijo Tomperi 08b25dc0d4 Refactoring: Global/Static variables, FunctionList, GlobalFunctions and UsedGlobalFunctions are now private members of Tokenizer class.
Class GlobalFunction is now private subclass of Tokenizer. 
Global functions CheckGlobalFunctionUsage, FillFunctionList and GetFunctionTokenByName are now member functions of Tokenizer.
2008-11-15 22:41:56 +00:00
Daniel Marjamäki 2cbfa6b60b Memory Leak: Handling Linux lists better => Detect more leaks 2008-11-15 18:24:40 +00:00
Daniel Marjamäki adad786d75 SimplifyTokens: Replace 'sizeof(*abc)' with '100'. This prevents false positives in checks 2008-11-15 17:21:35 +00:00
Reijo Tomperi 1efb4c95a6 Refactoring: Global variable Files is no more. Use tokenizer->getFiles() to get a pointer to it. 2008-11-13 22:39:47 +00:00
Reijo Tomperi 0b1ee10353 Refactoring: tokens_back and TypeSize are no longer global variables 2008-11-12 22:50:40 +00:00
Reijo Tomperi 134985e410 Refactoring: Tokenizer object given as a parameter to most of the classes 2008-11-12 21:34:47 +00:00
Daniel Marjamäki 0c910c9775 Memory leak: Added TODO test. Mismatching allocation and deallocation in subfunction 2008-11-11 20:03:06 +00:00
Daniel Marjamäki f347efd802 Memory leak: Fixed one more unit test 2008-11-11 19:46:08 +00:00
Reijo Tomperi f242c4fddd Refactoring: Following new classes were created:
CheckBufferOverrunClass
CheckClass
CheckHeaders
CheckMemoryLeakClass
CheckOther
Preprocessor
2008-11-11 06:42:09 +00:00
Daniel Marjamäki 607a4337ec testmemleak: Added todo 'forwhile7' 2008-11-10 20:30:47 +00:00
Daniel Marjamäki 90635eced7 Memory leak: Handle "goto" a little differently 2008-11-10 20:18:03 +00:00
Daniel Marjamäki 0ea17838cf cleanup 2008-11-10 18:56:02 +00:00
Daniel Marjamäki f4712ef5bf Memory leaks: Added tests and handling for 'throw' and linux lists 2008-11-10 18:51:44 +00:00
Daniel Marjamäki fd7ce880aa Memory Leak: Improved checking of subfunctions. Simplify their code. 2008-11-09 17:36:53 +00:00
Daniel Marjamäki 2c74d1c0de Memory leak: Ensure that simple memory leak is detected 2008-11-09 17:27:23 +00:00
Daniel Marjamäki 8fce5d39e5 Memory leak: Began work for parsing into subfunctions. 2008-11-09 16:34:18 +00:00
Daniel Marjamäki 26bfab1c7e Memory leak: Removed false positives. 'use ; use ;' is not always the same as 'use ;' 2008-11-09 10:09:42 +00:00
Daniel Marjamäki c2ea705fd7 Memory Leak: Stronger checking. Ignore 'if use ;' and 'if dealloc;'. A leak could occur if it's not executed. 2008-11-09 08:40:57 +00:00