DiosThread.nativecodeanalysis.sarif 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. {
  2. "version": "2.1.0",
  3. "$schema": "https://schemastore.azurewebsites.net/schemas/json/sarif-2.1.0-rtm.5.json",
  4. "runs": [
  5. {
  6. "results": [
  7. {
  8. "ruleId": "C28159",
  9. "message": {
  10. "text": "考虑使用“GetTickCount64”而不是“GetTickCount”。原因: GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetTickCount64 operates on 64 bit values and does not have that problem"
  11. },
  12. "locations": [
  13. {
  14. "physicalLocation": {
  15. "artifactLocation": {
  16. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DiosThread/DiosThread.cpp"
  17. },
  18. "region": {
  19. "startLine": 247,
  20. "startColumn": 18,
  21. "endLine": 247,
  22. "endColumn": 30
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "?WaitTheThreadOnTheRun@Thread_Base@@QEAA_NK@Z",
  28. "kind": "function"
  29. }
  30. ]
  31. }
  32. ]
  33. },
  34. {
  35. "ruleId": "C28159",
  36. "message": {
  37. "text": "考虑使用“GetTickCount64”而不是“GetTickCount”。原因: GetTickCount overflows roughly every 49 days. Code that does not take that into account can loop indefinitely. GetTickCount64 operates on 64 bit values and does not have that problem"
  38. },
  39. "locations": [
  40. {
  41. "physicalLocation": {
  42. "artifactLocation": {
  43. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DiosThread/DiosThread.cpp"
  44. },
  45. "region": {
  46. "startLine": 249,
  47. "startColumn": 12,
  48. "endLine": 249,
  49. "endColumn": 24
  50. }
  51. },
  52. "logicalLocations": [
  53. {
  54. "decoratedName": "?WaitTheThreadOnTheRun@Thread_Base@@QEAA_NK@Z",
  55. "kind": "function"
  56. }
  57. ]
  58. }
  59. ]
  60. },
  61. {
  62. "ruleId": "C6258",
  63. "message": {
  64. "text": "使用 TerminateThread 将不允许进行适当的线程清理。"
  65. },
  66. "locations": [
  67. {
  68. "physicalLocation": {
  69. "artifactLocation": {
  70. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DiosThread/DiosThread.cpp"
  71. },
  72. "region": {
  73. "startLine": 303,
  74. "startColumn": 4,
  75. "endLine": 303,
  76. "endColumn": 35
  77. }
  78. },
  79. "logicalLocations": [
  80. {
  81. "decoratedName": "?StopThread@Thread_Base@@QEAA_NK@Z",
  82. "kind": "function"
  83. }
  84. ]
  85. }
  86. ]
  87. }
  88. ],
  89. "tool": {
  90. "driver": {
  91. "name": "PREfast",
  92. "fullName": "PREfast Code Analysis",
  93. "version": "14.29.30133.0",
  94. "informationUri": "https://aka.ms/cpp/ca"
  95. }
  96. },
  97. "invocations": [
  98. {
  99. "commandLine": "\"C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\c1xx.dll\" -ACf{1F7B090C-16DB-4822-966A-A93D26ED4681} -ACpmspft140.dll -Alint -D_PREFAST_ -D_AST_FE_ -Analyze -zm0x0064C1B0 -allChunksReserved -il C:\\Users\\ecom\\AppData\\Local\\Temp\\_CL_3ee56a32ast -typedil -f DiosThread.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -pc \\:/ -D_MSC_VER=1929 -D_MSC_FULL_VER=192930133 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GR -D_CPPRTTI -I G:\\vcpkg\\installed\\x64-windows\\include -nologo -W 3 -diagnostics:column -D_GUARDOVERFLOW_CRT_ALLOCATORS=1 -GF -Og -Ot -Oy -Oi -ltcg -DCODE_ANALYSIS -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DDIOSTHREAD_EXPORTS -D_WINDLL -D_MBCS -EHs -D_CPPUNWIND -EHc -MD -D_MT -D_DLL -GS -D_M_FP_PRECISE -Zc:wchar_t -Zc:forScope -Yustdafx.h -Fpx64\\Release\\DiosThreadX64.pch -Fox64\\Release\\DiosThread.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DeviceV3.0\\DriverPlatform-V3.1\\DiosThread -analyze:rulesetdirectory ;C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\\\Rule Sets; -analyze:ruleset C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\Rule Sets\\NativeRecommendedRules.ruleset -analyze:quiet -analyze:plugin C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\EspXEngine.dll -FC -errorreport:prompt -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -I E:\\DeviceV3.0\\deliver\\include -I G:\\vcpkg\\installed\\x64-windows\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\ucrt -external:I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\um -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\shared -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\winrt -external:I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.22621.0\\cppwinrt -external:I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -external:I G:\\vcpkg\\installed\\x64-windows\\include -I G:\\vcpkg\\installed\\x64-windows\\include",
  100. "executionSuccessful": true
  101. }
  102. ],
  103. "artifacts": [
  104. {
  105. "location": {
  106. "uri": "file:///E:/DeviceV3.0/DriverPlatform-V3.1/DiosThread/DiosThread.cpp"
  107. },
  108. "roles": [
  109. "analysisTarget",
  110. "resultFile"
  111. ],
  112. "hashes": {
  113. "md5": "3da93a6a0bd60383de85b003c2d89921"
  114. }
  115. },
  116. {
  117. "location": {
  118. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/diosthread/stdafx.h"
  119. },
  120. "hashes": {
  121. "md5": "1670d257289af5a4bf0cc9741805575e"
  122. }
  123. },
  124. {
  125. "location": {
  126. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/diosthread/targetver.h"
  127. },
  128. "hashes": {
  129. "md5": "20a1397a4f718d91f76e2681bef085b6"
  130. }
  131. },
  132. {
  133. "location": {
  134. "uri": "file:///e:/devicev3.0/deliver/include/msgqueue.h"
  135. },
  136. "hashes": {
  137. "md5": "73927cf318a5240ea737c7748703f3fc"
  138. }
  139. },
  140. {
  141. "location": {
  142. "uri": "file:///e:/devicev3.0/deliver/include/scopelock.h"
  143. },
  144. "hashes": {
  145. "md5": "fe1c154331759bc62a8157897df388f0"
  146. }
  147. },
  148. {
  149. "location": {
  150. "uri": "file:///e:/devicev3.0/deliver/include/definitions.h"
  151. },
  152. "hashes": {
  153. "md5": "1b36a119d096288c057adf16222c01a8"
  154. }
  155. },
  156. {
  157. "location": {
  158. "uri": "file:///e:/devicev3.0/deliver/include/resdataobject.h"
  159. },
  160. "hashes": {
  161. "md5": "5952703846c703003535fa667ae9a289"
  162. }
  163. },
  164. {
  165. "location": {
  166. "uri": "file:///e:/devicev3.0/driverplatform-v3.1/diosthread/diosthread.h"
  167. },
  168. "hashes": {
  169. "md5": "bcf85fc2a8499ba80fd45eee229dd64c"
  170. }
  171. },
  172. {
  173. "location": {
  174. "uri": "file:///e:/devicev3.0/deliver/include/dioslock.h"
  175. },
  176. "hashes": {
  177. "md5": "6ef694600e306d1039fe501b0e4db656"
  178. }
  179. }
  180. ]
  181. }
  182. ]
  183. }