Skip to content

Fix BOF in the last channel handling logic of SSE ShuffleChannel #5735

Merged
nihui merged 8 commits intoTencent:masterfrom
junwha:fix-bof
May 9, 2026
Merged

Fix BOF in the last channel handling logic of SSE ShuffleChannel #5735
nihui merged 8 commits intoTencent:masterfrom
junwha:fix-bof

Conversation

@junwha
Copy link
Copy Markdown
Contributor

@junwha junwha commented Oct 14, 2024

Fix #5734

  • apply SSE logic until size-1
  • apply linear logic for the last n elements

@tencent-adm
Copy link
Copy Markdown
Member

tencent-adm commented Oct 14, 2024

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

❌ junwha
❌ nihui
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Oct 15, 2024

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.58%. Comparing base (8c18666) to head (0d663ae).
⚠️ Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5735      +/-   ##
==========================================
- Coverage   93.59%   93.58%   -0.01%     
==========================================
  Files         933      933              
  Lines      299557   299664     +107     
==========================================
+ Hits       280360   280446      +86     
- Misses      19197    19218      +21     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Junwha Hong <qbit@unist.ac.kr>
Comment thread src/layer/x86/shufflechannel_x86.cpp
Comment thread src/layer/x86/shufflechannel_x86.cpp Outdated
Comment thread src/layer/arm/shufflechannel_arm.cpp Outdated
Comment thread src/layer/x86/shufflechannel_x86.cpp Outdated
Comment thread src/layer/arm/shufflechannel_arm.cpp Outdated
Comment thread src/layer/arm/shufflechannel_arm.cpp
@junwha
Copy link
Copy Markdown
Contributor Author

junwha commented Oct 18, 2024

Hi @nihui,
Thank you for the fast response and review!
I will reflect the unrolling part.

Could I ask why do you think the out-of-bound risk does not exist in pack8/16 codes?
As far as I think, it also accesses (start of the channel) + (size-1)*(element size) + (element size)/2 in the same manner, which is beyond the size of the channel.

Thank you for your effort on this issue!

@github-actions github-actions Bot added the test label May 9, 2026
@nihui nihui merged commit 8da3df9 into Tencent:master May 9, 2026
109 of 113 checks passed
@nihui
Copy link
Copy Markdown
Member

nihui commented May 9, 2026

Thanks for your contribution !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The last channel handling logic in the SSE version of ShuffleChannel cause buffer-overflow

4 participants