Klocwork test suite Test suite #106
DownloadDescription
Klocwork, Inc. donated 41 C and C++ test cases from the regression test suite for their tool. Most are related to memory management, e.g., memory leak, bad free, and use after free.
Displaying test cases 26 - 41 of 41 in total
-
Variable used as index of array is correctly initialized before use.
-
Memory is freed, then the pointer variable (not the memory location) is assigned a value.
-
Pointer reference to freed memory is returned in function.
-
Attempt to double free memory.
-
Attempt to return a pointer to memory that has been freed.
-
Attempt to assign memory content that has already been freed.
-
Attempt to pass a pointer to freed memory to function.
-
Attempted double free with primary control flow influencing whether the second free takes place.
-
Attempt to assign a pointer address without allocating memory.
-
Return of an uninitialized pointer from a function.
-
Memory for a Struct object is freed and not referenced further.
-
Character pointer is assigned value beyond current buffer using sizeof() function (with brackets).
-
Integer pointer is assigned a value within current buffer.
-
Memory allocated with new() function call is not freed with delete() call, nor is its pointer returned by the funcation.
-
Attempt to call function of deleted object.
-
Attempted "double free" of allocated memory.