Skip to content

fix some safty problem#437

Merged
iforgetmyname merged 1 commit intosgl-project:mainfrom
zzx-study:330safe
Apr 12, 2026
Merged

fix some safty problem#437
iforgetmyname merged 1 commit intosgl-project:mainfrom
zzx-study:330safe

Conversation

@zzx-study
Copy link
Copy Markdown
Contributor

@zzx-study zzx-study commented Apr 11, 2026

Fixes issue #340

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request enhances code safety by replacing std::memcpy with std::memcpy_s, fixing an indexing error in CheckWindowSize, and adding null pointer checks in tiling functions. It also introduces timeout detection for synchronization and updates the CeilDiv utility. Feedback was provided regarding the CeilDiv implementation, noting that the overflow check is unreliable for signed types and that T_MAX is undefined, with a suggestion for a more robust implementation.

@zzx-study zzx-study force-pushed the 330safe branch 4 times, most recently from a76d33e to 3504857 Compare April 12, 2026 04:36
@iforgetmyname iforgetmyname merged commit acd885a into sgl-project:main Apr 12, 2026
7 checks passed
zzx-study added a commit to zzx-study/sgl-kernel-npu that referenced this pull request Apr 13, 2026
…into 330safe

* 'main' of https://github.com/sgl-project/sgl-kernel-npu:
  Fix overflowing risk (sgl-project#440)
  fix safety problems (sgl-project#437)
  Fix security issues after LibingAI scan (sgl-project#438)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants