Daniel Marjamäki
8f1f89ae2b
memory leaks: fixed todo test case. reduce exit better
2009-08-29 16:03:23 +02:00
Daniel Marjamäki
6347d0e976
memory leaks: better handling of open/close
2009-08-29 09:18:21 +02:00
Daniel Marjamäki
88d0bd3908
astyle
2009-08-29 08:20:18 +02:00
Daniel Marjamäki
ee5b2a43c7
Fixed #627 (False positive with --all, Resource leak with open())
2009-08-29 07:43:44 +02:00
Daniel Marjamäki
de9e62e90a
Memory leaks: handling asprintf better
2009-08-29 07:26:32 +02:00
Daniel Marjamäki
406fdd3219
Memory leaks: Fixed two todo testcases (getcode handling of asprintf)
2009-08-29 07:02:36 +02:00
Daniel Marjamäki
ab047c680c
memory leaks: fixed a todo testcase
2009-08-29 06:42:24 +02:00
Daniel Marjamäki
74fd052fc0
Memory leaks: Testing that asprintf is handled correctly
2009-08-28 23:26:40 +02:00
Reijo Tomperi
e3c1e14bb0
astyle fix
2009-08-26 00:41:03 +03:00
Daniel Marjamäki
d67e3fcc49
Refactoring the unit tests of TestMemleakInFunction
2009-08-25 22:18:22 +02:00
Daniel Marjamäki
c25e1963b1
Fixed #498 (Tokenizer: simplify 'goto')
2009-08-24 23:10:12 +02:00
Daniel Marjamäki
9da2ecf4f4
Refactoring the unit testing. Wrote special tests for CheckMemoryLeakInFunction::findleak
2009-08-23 15:48:25 +02:00
Daniel Marjamäki
0da25081d5
refactoring: began refactoring the unit testing for CheckMemoryLeakInFunction. More specific testing of the functions getcode, simplifycode, call_func, etc
2009-08-23 11:26:17 +02:00
Daniel Marjamäki
8b46172bcf
Memory leaks: Use varid instead of varname
2009-08-19 19:42:07 +02:00
Daniel Marjamäki
85682ed429
Fixed #591 (False positive: Deallocating a deallocated pointer)
2009-08-18 20:49:08 +02:00
danmar
3de825c290
Borland C++ Builder: Fixed compilation and testrunner problems
2009-08-13 22:13:52 +02:00
Daniel Marjamäki
ecdbcbce3d
Fixed #566 (False positive when assigning the return value of realloc(NULL,..) to a pointer variable holding a freed memory address)
2009-08-10 22:04:28 +02:00
Daniel Marjamäki
ce8c5b0236
Fixed #555 (False positive: [CuTest.c:25]: (error) Memory leak: len)
2009-08-05 21:18:16 +02:00
Daniel Marjamäki
9e348ca739
Fixed #554 (resource leak false positive)
2009-08-04 21:34:14 +02:00
Daniel Marjamäki
706ba34a6d
Refactoring the unit testing
2009-08-04 21:32:14 +02:00
Reijo Tomperi
769119c725
Fix ticket #552 (False positive with --all when realloc is used with two variables.)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/552
2009-08-02 23:30:43 +03:00
Reijo Tomperi
10f6678cf9
TODO test case realloc5 added and "Checkmemoryleak: simplifycode result for" debug info added.
2009-08-02 22:23:47 +03:00
Daniel Marjamäki
b7ffcf53ba
Fixed #511 (false positive, memory leak when using 'var = ({});')
2009-07-31 23:42:21 +02:00
Daniel Marjamäki
050b85c5eb
memory leak for struct member: fixed false positive when the struct pointer is stored away
2009-07-29 11:38:20 +02:00
Daniel Marjamäki
6bb85703f6
memory leaks: fixed false positive for struct members - better handling of if/else
2009-07-24 09:05:40 +02:00
Daniel Marjamäki
73c028bdb7
memory leaks: added a todo test case for struct members when using if-else
2009-07-23 22:29:31 +02:00
Daniel Marjamäki
565ac2fca6
Fixed #493 (Memory leak: False positive when using the exit(0))
2009-07-23 16:30:30 +02:00
Daniel Marjamäki
3243933c90
Fixed #494 (False positives of checking leaks struct members)
...
Better handling of function calls
2009-07-22 08:30:51 +02:00
Daniel Marjamäki
6f646246ee
dereferencing deallocated memory: it is ok to take the address to deallocated memory but it is not ok to dereference the address
2009-07-21 13:04:13 +02:00
Daniel Marjamäki
74699cab66
memory leak for struct member: made the checking more sensitive. Skip bail-out execution paths were the member is properly deallocated
2009-07-20 14:39:24 +02:00
Daniel Marjamäki
ddaea3244d
memleak: implemented simple checking for leaking struct members
2009-07-19 16:51:31 +02:00
Daniel Marjamäki
ffac9281c4
astyle formatting
2009-07-18 20:35:22 +02:00
Slava Semushin
2ba0897ecb
src/checkmemoryleak.cpp: added fchmod() function to white list.
2009-07-18 23:48:48 +07:00
Slava Semushin
a0a526a205
Fixed ticket #464 (resource leak not detected when getc is used on the file handle)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/464
2009-07-18 18:32:55 +07:00
Daniel Marjamäki
7d35447d80
refactoring: renamed the severity "all" to "possible error"
2009-07-13 10:16:31 +02:00
Daniel Marjamäki
2a02041fd8
memleak: fixed todo test case
2009-07-07 15:22:37 +02:00
Daniel Marjamäki
7b2f6b6173
addon to previous commit - changed ASSERT_EQUALS to TODO_ASSERT_EQUALS for the todo test case
2009-07-06 12:38:04 +02:00
Daniel Marjamäki
5efb834f36
Memory leaks: Added a simple todo test case
2009-07-06 12:33:31 +02:00
Daniel Marjamäki
9beb73824b
Fixed #446 (memory leak false positive when variable is static)
2009-07-06 12:20:13 +02:00
Reijo Tomperi
f676deb208
Test case improvement, unused function removed from tokenizer.
2009-07-05 22:37:53 +03:00
Daniel Marjamäki
13ca5f89be
added test case
2009-06-23 18:29:43 +02:00
Slava Semushin
13e805f332
Fixed ticket #399 (Add detection for resource leaks after open() usage)
...
http://sourceforge.net/apps/trac/cppcheck/ticket/399
2009-06-21 22:01:43 +07:00
Daniel Marjamäki
8715ba1458
CheckMemoryLeakInFunction: More sensitive checking when the code calls an unknown function
2009-06-21 14:12:59 +02:00
Daniel Marjamäki
f28dec1f5a
detect memory leak when all is given when calling an unknown function
2009-06-21 13:48:39 +02:00
Daniel Marjamäki
453a5cdd47
Fixed ticket #411 (false positive: resource leak in while loop)
2009-06-20 13:58:30 +02:00
Daniel Marjamäki
5d0d21d668
Fixed a false positive (memory leak)
...
This false positive was first discovered in the VLC sourcecode. The TestMemoryLeakInFunction::simple11 test case is a simplified test code of that code.
2009-06-17 21:42:49 +02:00
Daniel Marjamäki
b7c9a4ed8c
Created a new class for detecting leaks (forgetting to free struct members)
2009-06-16 22:01:04 +02:00
Daniel Marjamäki
ed98f1b367
Fixed #131 (Regression: leak reported by 1.27 is not reported by 1.29)
...
The leak will be reported as a definite bug again. Not just a possible bug.
cppcheck don't know if the execution path is possible, but it knows that if the execution path is taken the memory leak will be certain.
2009-06-16 19:05:05 +02:00
Daniel Marjamäki
a81b6487bf
Improved the "CheckMemoryLeak::functionReturnType"
2009-06-15 21:13:39 +02:00
Daniel Marjamäki
433ff048a4
Fixed #264 (Memory Leak: alloc by assigning to a return value)
...
The fix was inspired by the previous patch submitted by hoangtuansu
2009-06-15 17:44:59 +02:00