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: Locked but never unlock The test case contains coincidental weaknesses along with intended ones as follows for file lock_never_unlock.c: * line(s): 151,208,227,305,324,367,392,445,469,521,545 CWE-843
-
Defect Type: Concurrency defects Defect Sub-type: Locked but never unlock Description: Defect Free Code to identify false positives while there has been a lock of a resource and never unlocked scenario The test case contains coincidental weaknesses along with intended ones as follows for file loc...
-
Defect Type: Resource management defects Defect Sub-type: Memory allocation failure Description: memory_allocation_failure - Memory could not be allocated / insufficient memory Created on: Oct 14, 2013 Author: hemalatha The test case contains coincidental weaknesses along with intended ones as f...
-
Defect Type: Resource management defects Defect Sub-type: Memory allocation failure Description: Defect Free Code to identify false positives while memory_allocation_failure - Memory could not be allocated / insufficient memory Created on: Oct 14, 2013 Author: hemalatha The test case contains co...
-
Defect Type: Resource management defects Defect Sub-type: Memory leakage The test case contains coincidental weaknesses along with intended ones as follows for file memory_leak.c: * line(s): 23 CWE-835 * line(s): 23 CWE-190 * line(s): 25 CWE-789 * line(s): 46,52,73,96,249,311,349,354,424,449,455,...
-
Defect Type: Resource management defects Defect Sub-type: Memory leakage Description: Defect Free Code to identify false positives in memory leak conditions The test case contains coincidental weaknesses along with intended ones as follows for file memory_leak.c: * line(s): 46,53,55,75,99,101,359...
-
Defect Type: Misc defects Defect Sub-type: Non void function does not return value
-
Defect Type: Misc defects Defect Sub-type: Non void function does not return value Description: Defect Free Code to identify false positives in conditions like having return value
-
Defect Type: Pointer related defects Defect Sub-type: Dereferencing a NULL pointer The test case contains coincidental weaknesses along with intended ones as follows for file null_pointer.c: * line(s): 105 CWE-822 * line(s): 231,282,300,318 CWE-561 * line(s): 238 CWE-824 * line(s): 340,341 CWE-476
-
Defect Type: Pointer related defects Defect Sub-type: Dereferencing a NULL pointer Description: Defect Free Code to identify false positives in deferencing Null Pointer The test case contains coincidental weaknesses along with intended ones as follows for file null_pointer.c: * line(s): 258,284,2...
-
Defect Type: Static memory defects Defect Sub-type: Static buffer overrun The test case contains coincidental weaknesses along with intended ones as follows for file overrun_st.c: * line(s): 22,33,45,56,67,78,89,100,111,170,183,195,207,223,251,265,281,294,307,321,334,347,360,373,388,403,429,444,4...
-
Defect Type: Static memory defects Defect Sub-type: Static buffer overrun Description: Defect Free Code to identify false positives in static buffer overrun The test case contains coincidental weaknesses along with intended ones as follows for file overrun_st.c: * line(s): 22,33,45,56,67,78,89,10...
-
Defect Type: Dynamic memory defects Defect Sub-type: Memory copy at overlapping areas
-
Defect Type: Dynamic memory defects Defect Sub-type: Memory copy at overlapping areas Description: Defect Free Code to identify false positives in memory copy at overlapping areas
-
Defect Type: Numerical defects Defect Sub-type: Power related errors The test case contains coincidental weaknesses along with intended ones as follows for file pow_related_errors.c: * line(s): 154,155,157,158 CWE-476 * line(s): 161 CWE-189
-
Defect Type: Numerical defects Defect Sub-type: Power related errors Description: Defect Free Code to identify false positives in power related errors The test case contains coincidental weaknesses along with intended ones as follows for file pow_related_errors.c: * line(s): 149,150,151,152 CWE-4...
-
Defect Type: Pointer related defects Defect Sub-type: Incorrect pointer arithmetic
-
Defect Type: Pointer related defects Defect Sub-type: Incorrect pointer arithmetic Description: Defect Free Code to identify false positives in pointer arithmetic subtraction The test case contains coincidental weaknesses along with intended ones as follows for file ptr_subtraction.c: * line(s): ...
-
Defect Type: Concurrency defects Defect Sub-type: Race condition The test case contains coincidental weaknesses along with intended ones as follows for file race_condition.c: * line(s): 30,88,136,210,284,353 CWE-362
-
Defect Type: Concurrency defects Defect Sub-type: Race condition Description: Defect Free Code to identify false positives in race condition The test case contains coincidental weaknesses along with intended ones as follows for file race_condition.c: * line(s): 38,55 CWE-362
-
Defect Type: Inappropriate code Defect Sub-type: Redundant conditions
-
Defect Type: Inappropriate code Defect Sub-type: Redundant conditions Description: Defect Free Code to identify false positives in redundant condition
-
Defect Type: Resource management defects Defect Sub-type: Return of a pointer to a local variable
-
Defect Type: Resource management defects Defect Sub-type: Return of a pointer to a local variable Description: Defect Free Code to identify false positives in return of local variables
-
Defect Type: Numerical defects Defect Sub-type: Integer sign lost because of unsigned cast