BuffManager.nativecodeanalysis.sarif 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  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": "C6387",
  9. "message": {
  10. "text": "“m_Lock”可能是“0”: 这不符合函数“WaitForSingleObject”的规范。"
  11. },
  12. "locations": [
  13. {
  14. "physicalLocation": {
  15. "artifactLocation": {
  16. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  17. },
  18. "region": {
  19. "startLine": 21,
  20. "startColumn": 2,
  21. "endLine": 21,
  22. "endColumn": 30
  23. }
  24. },
  25. "logicalLocations": [
  26. {
  27. "decoratedName": "??0BuffManager@@QEAA@XZ",
  28. "kind": "function"
  29. }
  30. ]
  31. }
  32. ],
  33. "codeFlows": [
  34. {
  35. "threadFlows": [
  36. {
  37. "locations": [
  38. {
  39. "location": {
  40. "physicalLocation": {
  41. "artifactLocation": {
  42. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  43. },
  44. "region": {
  45. "startLine": 17,
  46. "startColumn": 1
  47. }
  48. }
  49. },
  50. "importance": "unimportant"
  51. },
  52. {
  53. "location": {
  54. "physicalLocation": {
  55. "artifactLocation": {
  56. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  57. },
  58. "region": {
  59. "startLine": 18,
  60. "startColumn": 12
  61. }
  62. }
  63. },
  64. "importance": "unimportant"
  65. },
  66. {
  67. "location": {
  68. "physicalLocation": {
  69. "artifactLocation": {
  70. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  71. },
  72. "region": {
  73. "startLine": 20,
  74. "startColumn": 9
  75. }
  76. }
  77. },
  78. "importance": "unimportant"
  79. },
  80. {
  81. "location": {
  82. "physicalLocation": {
  83. "artifactLocation": {
  84. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  85. },
  86. "region": {
  87. "startLine": 21,
  88. "startColumn": 21
  89. }
  90. },
  91. "message": {
  92. "text": "“m_Lock”不应为 NULL,因为这与“WaitForSingleObject”上的 SAL 批注不一致"
  93. }
  94. },
  95. "kinds": [
  96. "usage"
  97. ],
  98. "importance": "essential"
  99. }
  100. ]
  101. }
  102. ]
  103. }
  104. ]
  105. },
  106. {
  107. "ruleId": "C6387",
  108. "message": {
  109. "text": "“m_Lock”可能是“0”: 这不符合函数“ReleaseMutex”的规范。查看第 21 行以找出可能会发生此情况的前一位置"
  110. },
  111. "locations": [
  112. {
  113. "physicalLocation": {
  114. "artifactLocation": {
  115. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  116. },
  117. "region": {
  118. "startLine": 33,
  119. "startColumn": 2,
  120. "endLine": 33,
  121. "endColumn": 15
  122. }
  123. },
  124. "logicalLocations": [
  125. {
  126. "decoratedName": "??0BuffManager@@QEAA@XZ",
  127. "kind": "function"
  128. }
  129. ]
  130. }
  131. ],
  132. "codeFlows": [
  133. {
  134. "threadFlows": [
  135. {
  136. "locations": [
  137. {
  138. "location": {
  139. "physicalLocation": {
  140. "artifactLocation": {
  141. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  142. },
  143. "region": {
  144. "startLine": 17,
  145. "startColumn": 1
  146. }
  147. }
  148. },
  149. "importance": "unimportant"
  150. },
  151. {
  152. "location": {
  153. "physicalLocation": {
  154. "artifactLocation": {
  155. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  156. },
  157. "region": {
  158. "startLine": 18,
  159. "startColumn": 12
  160. }
  161. }
  162. },
  163. "importance": "unimportant"
  164. },
  165. {
  166. "location": {
  167. "physicalLocation": {
  168. "artifactLocation": {
  169. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  170. },
  171. "region": {
  172. "startLine": 20,
  173. "startColumn": 9
  174. }
  175. }
  176. },
  177. "importance": "unimportant"
  178. },
  179. {
  180. "location": {
  181. "physicalLocation": {
  182. "artifactLocation": {
  183. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  184. },
  185. "region": {
  186. "startLine": 21,
  187. "startColumn": 21
  188. }
  189. }
  190. },
  191. "importance": "unimportant"
  192. },
  193. {
  194. "location": {
  195. "physicalLocation": {
  196. "artifactLocation": {
  197. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  198. },
  199. "region": {
  200. "startLine": 24,
  201. "startColumn": 4
  202. }
  203. }
  204. },
  205. "importance": "unimportant"
  206. },
  207. {
  208. "location": {
  209. "physicalLocation": {
  210. "artifactLocation": {
  211. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  212. },
  213. "region": {
  214. "startLine": 25,
  215. "startColumn": 25
  216. }
  217. }
  218. },
  219. "importance": "unimportant"
  220. },
  221. {
  222. "location": {
  223. "physicalLocation": {
  224. "artifactLocation": {
  225. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  226. },
  227. "region": {
  228. "startLine": 26,
  229. "startColumn": 4
  230. }
  231. }
  232. },
  233. "importance": "unimportant"
  234. },
  235. {
  236. "location": {
  237. "physicalLocation": {
  238. "artifactLocation": {
  239. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  240. },
  241. "region": {
  242. "startLine": 27,
  243. "startColumn": 25
  244. }
  245. }
  246. },
  247. "importance": "unimportant"
  248. },
  249. {
  250. "location": {
  251. "physicalLocation": {
  252. "artifactLocation": {
  253. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  254. },
  255. "region": {
  256. "startLine": 28,
  257. "startColumn": 4
  258. }
  259. }
  260. },
  261. "importance": "unimportant"
  262. },
  263. {
  264. "location": {
  265. "physicalLocation": {
  266. "artifactLocation": {
  267. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  268. },
  269. "region": {
  270. "startLine": 29,
  271. "startColumn": 25
  272. }
  273. }
  274. },
  275. "importance": "unimportant"
  276. },
  277. {
  278. "location": {
  279. "physicalLocation": {
  280. "artifactLocation": {
  281. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  282. },
  283. "region": {
  284. "startLine": 30,
  285. "startColumn": 4
  286. }
  287. }
  288. },
  289. "importance": "unimportant"
  290. },
  291. {
  292. "location": {
  293. "physicalLocation": {
  294. "artifactLocation": {
  295. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  296. },
  297. "region": {
  298. "startLine": 31,
  299. "startColumn": 25
  300. }
  301. }
  302. },
  303. "importance": "unimportant"
  304. },
  305. {
  306. "location": {
  307. "physicalLocation": {
  308. "artifactLocation": {
  309. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  310. },
  311. "region": {
  312. "startLine": 33,
  313. "startColumn": 14
  314. }
  315. },
  316. "message": {
  317. "text": "“m_Lock”不应为 NULL,因为这与“ReleaseMutex”上的 SAL 批注不一致"
  318. }
  319. },
  320. "kinds": [
  321. "usage"
  322. ],
  323. "importance": "essential"
  324. }
  325. ]
  326. }
  327. ]
  328. }
  329. ]
  330. }
  331. ],
  332. "tool": {
  333. "driver": {
  334. "name": "PREfast",
  335. "fullName": "PREfast Code Analysis",
  336. "version": "14.29.30147.0",
  337. "informationUri": "https://aka.ms/cpp/ca"
  338. }
  339. },
  340. "invocations": [
  341. {
  342. "commandLine": "\"d:\\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 -zm0x00B2C1B0 -allChunksReserved -il C:\\Users\\ecom\\AppData\\Local\\Temp\\_CL_0eeb00f3ast -typedil -f BuffManager.cpp -Ze -D_MSC_EXTENSIONS -Zp16 -pc \\:/ -D_MSC_VER=1929 -D_MSC_FULL_VER=192930147 -D_MSC_BUILD=0 -D_M_AMD64=100 -ZILP448 -D_M_X64=100 -D_WIN64 -D_WIN32 -GR -D_CPPRTTI -nologo -W 3 -diagnostics:column -D_GUARDOVERFLOW_CRT_ALLOCATORS=1 -GF -Og -Ot -Oy -Oi -ltcg -DCODE_ANALYSIS -DWIN32 -DNDEBUG -D_WINDOWS -D_USRDLL -DLOGGER_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\\DiosLoggerX64.pch -Fox64\\Release\\BuffManager.obj -Fdx64\\Release\\vc142.pdb -external:W 3 -Gd -analyze:projectdirectory E:\\DIOS_V2\\DriverPlatform\\Logger -analyze:rulesetdirectory ;d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\\\Rule Sets; -analyze:ruleset d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\Team Tools\\Static Analysis Tools\\Rule Sets\\NativeRecommendedRules.ruleset -analyze:quiet -analyze:plugin d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x86\\EspXEngine.dll -FC -errorreport:prompt -I E:\\deliver\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I C:\\Program Files (x86)\\Windows Kits\\NETFXSDK\\4.8\\Include\\um -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Tools\\MSVC\\14.29.30133\\atlmfc\\include -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\ucrt -external:I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -I d:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Professional\\VC\\Auxiliary\\VS\\UnitTest\\include -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\um -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\shared -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\winrt -external:I D:\\Windows Kits\\10\\Include\\10.0.19041.0\\cppwinrt -I D:\\Windows Kits\\10\\Include\\10.0.19041.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",
  343. "executionSuccessful": true
  344. }
  345. ],
  346. "artifacts": [
  347. {
  348. "location": {
  349. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/Logger.h"
  350. },
  351. "roles": [
  352. "resultFile"
  353. ],
  354. "hashes": {
  355. "md5": "dcc81685c0ed303899127b874b73f16e"
  356. }
  357. },
  358. {
  359. "location": {
  360. "uri": "file:///e:/dios_v2/driverplatform/logger/logger.cpp"
  361. },
  362. "roles": [
  363. "analysisTarget"
  364. ],
  365. "hashes": {
  366. "md5": "ac49a8c248497dc838b2d802948c70ca"
  367. }
  368. },
  369. {
  370. "location": {
  371. "uri": "file:///e:/dios_v2/driverplatform/logger/stdafx.h"
  372. },
  373. "hashes": {
  374. "md5": "8567dc0b4ba10b18d73585059110b847"
  375. }
  376. },
  377. {
  378. "location": {
  379. "uri": "file:///e:/dios_v2/driverplatform/logger/targetver.h"
  380. },
  381. "hashes": {
  382. "md5": "20a1397a4f718d91f76e2681bef085b6"
  383. }
  384. },
  385. {
  386. "location": {
  387. "uri": "file:///e:/deliver/include/dioslock.h"
  388. },
  389. "hashes": {
  390. "md5": "19f422bc4ce2ba8a2fd99f23bd1218fc"
  391. }
  392. },
  393. {
  394. "location": {
  395. "uri": "file:///e:/deliver/include/resdataobject.h"
  396. },
  397. "hashes": {
  398. "md5": "5952703846c703003535fa667ae9a289"
  399. }
  400. },
  401. {
  402. "location": {
  403. "uri": "file:///e:/dios_v2/driverplatform/logger/buffmanager.h"
  404. },
  405. "hashes": {
  406. "md5": "9af61e1db5cd9cb8d948fcdb0b0c59d1"
  407. }
  408. },
  409. {
  410. "location": {
  411. "uri": "file:///e:/dios_v2/driverplatform/logger/filemanager.h"
  412. },
  413. "hashes": {
  414. "md5": "8ad90668242c04d5c6f380cf869aee51"
  415. }
  416. },
  417. {
  418. "location": {
  419. "uri": "file:///e:/dios_v2/driverplatform/logger/circlebuff.h"
  420. },
  421. "hashes": {
  422. "md5": "b6be7f81864caf6bf5b36f3106f32879"
  423. }
  424. },
  425. {
  426. "location": {
  427. "uri": "file:///e:/deliver/include/localconfig.h"
  428. },
  429. "hashes": {
  430. "md5": "cd69a6005777ef114acf2acc87ee04b4"
  431. }
  432. },
  433. {
  434. "location": {
  435. "uri": "file:///e:/deliver/include/definitions.h"
  436. },
  437. "hashes": {
  438. "md5": "07878c897e77929c249016920da5e648"
  439. }
  440. },
  441. {
  442. "location": {
  443. "uri": "file:///e:/deliver/include/common_api.h"
  444. },
  445. "hashes": {
  446. "md5": "b3fe9e47713eb74ad1294f29077c8a8a"
  447. }
  448. },
  449. {
  450. "location": {
  451. "uri": "file:///e:/dios_v2/driverplatform/logger/logfilesavethread.h"
  452. },
  453. "hashes": {
  454. "md5": "f711f6f9f023d33a58de14185358083f"
  455. }
  456. },
  457. {
  458. "location": {
  459. "uri": "file:///e:/deliver/include/diosthread.h"
  460. },
  461. "hashes": {
  462. "md5": "f79dd78165d55ab364f98e65e1049af4"
  463. }
  464. },
  465. {
  466. "location": {
  467. "uri": "file:///e:/deliver/include/cdi.h"
  468. },
  469. "hashes": {
  470. "md5": "9e80d05743150a2349832daa11b23472"
  471. }
  472. },
  473. {
  474. "location": {
  475. "uri": "file:///e:/deliver/include/diosfilehandle.h"
  476. },
  477. "hashes": {
  478. "md5": "d7b028d6b156db169d9b66dfa079c3e2"
  479. }
  480. },
  481. {
  482. "location": {
  483. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/LogFileSaveThread.cpp"
  484. },
  485. "roles": [
  486. "analysisTarget",
  487. "resultFile"
  488. ],
  489. "hashes": {
  490. "md5": "73c75bd16efbfabefa523b99094d303c"
  491. }
  492. },
  493. {
  494. "location": {
  495. "uri": "file:///e:/dios_v2/driverplatform/logger/filemanager.cpp"
  496. },
  497. "roles": [
  498. "analysisTarget"
  499. ],
  500. "hashes": {
  501. "md5": "ac2bb72ef3c8eb34adfec21d82920995"
  502. }
  503. },
  504. {
  505. "location": {
  506. "uri": "file:///e:/dios_v2/driverplatform/logger/circlebuff.cpp"
  507. },
  508. "roles": [
  509. "analysisTarget"
  510. ],
  511. "hashes": {
  512. "md5": "ab73dfa7a64aa7a9a883d2e68a7ed54e"
  513. }
  514. },
  515. {
  516. "location": {
  517. "uri": "file:///E:/DIOS_V2/DriverPlatform/Logger/BuffManager.cpp"
  518. },
  519. "roles": [
  520. "analysisTarget",
  521. "resultFile"
  522. ],
  523. "hashes": {
  524. "md5": "c6c100d152ea5c1005f2d1a0935778f9"
  525. }
  526. }
  527. ]
  528. }
  529. ]
  530. }