intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
693 stars 183 forks source link

array cores[] in unit-test/lib/test_hw_monitoring.c has a suspicious access at index 1 #230

Closed ColinIanKing closed 1 year ago

ColinIanKing commented 1 year ago

Array cores[] has one element, it is being accessed at cores[1] which is out of range since only cores[0] is valid.

unit-test/lib/test_hw_monitoring.c:285:54: error: Array 'cores[1]' accessed at index 1, which is out of bounds. [arrayIndexOutOfBounds] expect_value(hw_mon_assoc_write, lcore, cores[1]);