ITC-Benchmarks Test suite #104
DownloadDescription
Toyota InfoTechnology Center (ITC), U.S.A.static analysis benchmarks for undefined behavior andconcurrency weaknesses. 100 test cases in C and C++containing a total of 685 pairs of intended weaknesses.Each pair has a version with a weakness and a fixed version.The test cases are Copyright (c) 2012-2014 and distributedunder the "BSD License." See Shin''ichi Shiraishi, Veena Mohan,and Hemalatha Marimuthu, "Test Suites for Benchmarks ofStatic Analysis Tools," IEEE Int''l Symp. on Software ReliabilityEngineering (ISSRE ''15), DOI: 10.1109/ISSREW.2015.7392027,originally obtained from https://github.com/regehr/itc-benchmarks.
Please note that test cases contain coincidental weaknessesflagged by SAMATE team, each described accordingly and individually.
Also please note that the SAMATE team determined that in a few cases,the code that was marked as weakness originally was in fact correct code.We describe these cases accordingly and individually.
-
Defect Type: Concurrency defects Defect Sub-type: Double lock Description: Defect Free Code to identify false positives in double lock - concurrency defects
-
Defect Type: Concurrency defects Defect Sub-type: Double release The test case contains coincidental weaknesses along with intended ones as follows for file double_release.c: * line(s): 24,25,50,70,71,101,118,119,147,164,165,192,213,214,241,260,261,288 CWE-561
-
Defect Type: Concurrency defects Defect Sub-type: Double release Description: Defect Free Code to identify false positives in double release - concurrency defects The test case contains coincidental weaknesses along with intended ones as follows for file double_release.c: * line(s): 24,25,48,68,6...
-
Defect Type: Misc defects Defect Sub-type: Unintentional end less loop The test case contains coincidental weaknesses along with intended ones as follows for file endless_loop.c: * line(s): 24,41,57,74,95,111,133,150,166 CWE-190 * line(s): 26,43,59,76,97,113,135,152,169 CWE-561
-
Defect Type: Misc defects Defect Sub-type: Unintentional end less loop Description: Defect Free Code to identify false positives in unintentional endless looping
-
Defect Type: Resource management defects Defect Sub-type: Free non dynamically allocated memory The test case contains coincidental weaknesses along with intended ones as follows for file free_nondynamic_allocated_memory.c: * line(s): 82,208 CWE-476 * line(s): 114,127,140 CWE-835
-
Defect Type: Resource management defects Defect Sub-type: Free non dynamically allocated memory Description: Defect Free Code to identify false positives while freeing non dynamically allocated memory The test case contains coincidental weaknesses along with intended ones as follows for file free...
-
Defect Type: Pointer related defects Defect Sub-type: Free NULL pointer The test case contains coincidental weaknesses along with intended ones as follows for file free_null_pointer.c: * line(s): 54,74,109,144,146,151,241,275,281,282,320,452,483,530,531,532 CWE-476 * line(s): 102,124,167,195,215...
-
Defect Type: Pointer related defects Defect Sub-type: Free NULL pointer Description: Defect Free Code to identify false positives while freeing null pointer The test case contains coincidental weaknesses along with intended ones as follows for file free_null_pointer.c: * line(s): 83,92,118,153,1...
-
Defect Type: Pointer related defects Defect Sub-type: Bad cast of a function pointer The test case contains coincidental weaknesses along with intended ones as follows for file func_pointer.c: * line(s): 101,103,151,157,177,179,180,182,210,216,229,240,241,262,338,352,395,397,438,443,560,561,601 C...
-
Defect Type: Pointer related defects Defect Sub-type: Bad cast of a function pointer Description: Defect Free Code to identify false positives in bad cast of function pointer The test case contains coincidental weaknesses along with intended ones as follows for file func_pointer.c: * line(s): 133...
-
Defect Type: Inappropriate code Defect Sub-type: Return value of function never checked The test case contains coincidental weaknesses along with intended ones as follows for file function_return_value_unchecked.c: * line(s): 71,90,122,128,134,214,279,284,289,316,397 CWE-561 * line(s): 163,422 CW...
-
Defect Type: Inappropriate code Defect Sub-type: Return value of function never checked Description: Defect Free Code to identify false positives of return value not checked scenarios The test case contains coincidental weaknesses along with intended ones as follows for file function_return_value...
-
Defect Type: Inappropriate code Defect Sub-type: Improper termination of block
-
Defect Type: Inappropriate code Defect Sub-type: Improper termination of block Description: Defect Free Code to identify false positives during improper termination of block
-
Defect Type: Misc defects Defect Sub-type: Useless assignment
-
Defect Type: Misc defects Defect Sub-type: Useless assignment Description: Defect Free Code to identify false positives during useless assignment
-
Defect Type: Misc defects Defect Sub-type: Bad extern type for global variable
-
Defect Type: Misc defects Defect Sub-type: Bad extern type for global variable Description: Defect Free Code to identify false positives during invalid extern declaration The test case contains coincidental weaknesses along with intended ones as follows for file invalid_extern.c: * line(s): 61 CW...
-
Defect Type: Resource management defects Defect Sub-type: Invalid memory access to already freed area The test case contains coincidental weaknesses along with intended ones as follows for file invalid_memory_access.c: * line(s): 33,37,60,65,72 CWE-561 * line(s): 45,67,84,133,181,188,201,205,206,...
-
Defect Type: Resource management defects Defect Sub-type: Invalid memory access to already freed area Description: Defect Free Code to identify false positives during invalid memory access The test case contains coincidental weaknesses along with intended ones as follows for file invalid_memory_a...
-
Defect Type: Dynamic memory defects Defect Sub-type: Assign small buffer for structure
-
Defect Type: Dynamic memory defects Defect Sub-type: Assign small buffer for structure Description: Defect Free Code to identify false positives in lesser static memory allocation
-
Defect Type: Concurrency defects Defect Sub-type: Live lock The test case contains coincidental weaknesses along with intended ones as follows for file livelock.c: * line(s): 31,49 CWE-190
-
Defect Type: Concurrency defects Defect Sub-type: Live lock Description: Defect Free Code to identify false positives in live lock - concurrency conditions