Skip to content

[CPU]fix_coverity_scan_issues - #37338

Open
chenhu-wang wants to merge 1 commit into
openvinotoolkit:masterfrom
chenhu-wang:chenhu/coverity_issues_fix
Open

[CPU]fix_coverity_scan_issues#37338
chenhu-wang wants to merge 1 commit into
openvinotoolkit:masterfrom
chenhu-wang:chenhu/coverity_issues_fix

Conversation

@chenhu-wang

@chenhu-wang chenhu-wang commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Details:

  • fix_coverity_scan_issues

Tickets:

AI Assistance:

  • AI assistance used: no / yes
  • If yes, summarize how AI was used and what human validation was performed (build/tests/manual checks).

@chenhu-wang
chenhu-wang requested review from a team as code owners August 10, 2026 11:19
@github-actions github-actions Bot added the category: CPU OpenVINO CPU plugin label Aug 10, 2026
@chenhu-wang
chenhu-wang force-pushed the chenhu/coverity_issues_fix branch from 8fc03ba to 241f458 Compare August 10, 2026 11:45
@maxnick maxnick added this to the 2026.4 milestone Aug 10, 2026
@maxnick

maxnick commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@nshchego , could you please review?

@chenhu-wang
chenhu-wang force-pushed the chenhu/coverity_issues_fix branch 5 times, most recently from b51bfca to 540281f Compare August 11, 2026 07:55
@yuxu42
yuxu42 requested a lite review from Copilot August 11, 2026 08:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Warning

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

This PR addresses Coverity scan findings in the Intel CPU plugin by hardening edge cases (division-by-zero and invalid shapes) and improving exception-safety / memory handling in a few low-level components.

Changes:

  • Add guards to prevent divide-by-zero in softmax and sparse-rate calculations.
  • Add runtime validation for interpolation coordinate transform inputs.
  • Adjust scratch buffer / memory construction and add exception handling in destructors.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
src/plugins/intel_cpu/src/nodes/scaled_attn.cpp Avoid divide-by-zero when normalizing softmax output.
src/plugins/intel_cpu/src/nodes/llm_mlp.cpp Change how scratch buffer pointer is shared between ops.
src/plugins/intel_cpu/src/nodes/kernels/x64/registers_pool.hpp Add try/catch in destructors / move assignment and include iostream-based logging.
src/plugins/intel_cpu/src/nodes/kernels/scaled_attn/softmax_kernel.hpp Avoid divide-by-zero when computing scalar for softmax.
src/plugins/intel_cpu/src/nodes/fullyconnected.cpp Avoid divide-by-zero when computing sparse rate.
src/plugins/intel_cpu/src/nodes/executors/interpolate.cpp Throw on invalid inShape == 0 in coordinate transform.
src/plugins/intel_cpu/src/nodes/executors/dnnl/dnnl_gathermatmul_executor.cpp Construct Memory using MemoryBlock for tmp input.
src/plugins/intel_cpu/src/emitters/snippets/x64/utils.cpp Add try/catch in destructor and iostream-based logging.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/plugins/intel_cpu/src/nodes/llm_mlp.cpp
Comment thread src/plugins/intel_cpu/src/nodes/kernels/x64/registers_pool.hpp
Comment thread src/plugins/intel_cpu/src/nodes/kernels/x64/registers_pool.hpp
Comment thread src/plugins/intel_cpu/src/nodes/kernels/x64/registers_pool.hpp
Comment thread src/plugins/intel_cpu/src/emitters/snippets/x64/utils.cpp
Comment thread src/plugins/intel_cpu/src/emitters/snippets/x64/utils.cpp
Comment thread src/plugins/intel_cpu/src/nodes/executors/interpolate.cpp
@chenhu-wang
chenhu-wang force-pushed the chenhu/coverity_issues_fix branch from 445ce46 to 14ae35a Compare August 12, 2026 08:45
@chenhu-wang
chenhu-wang requested a review from nshchego August 13, 2026 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: CPU OpenVINO CPU plugin

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants