[GH-ISSUE #366] [Suggest] Fix undefined uint32 right-shift behavior in the transaction window #250

Open
opened 2026-10-26 09:57:24 +00:00 by bsakaguchi · 1 comment
Owner

Originally created by @a1372422617 on GitHub (Aug 19, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/366

uint32 a = 0xffffffff;
a >= 32;
This is undefined behavior in C/C++. To prevent it from being optimized away cause hang or transaction window failure

now:
window >>= num_empty_slots;
fix:
window = num_empty == 32 ? 0 : window >> num_empty_slots;

Originally created by @a1372422617 on GitHub (Aug 19, 2025). Original GitHub issue: https://github.com/deepseek-ai/DeepEP/issues/366 uint32 a = 0xffffffff; a >= 32; This is undefined behavior in C/C++. To prevent it from being optimized away cause hang or transaction window failure now: window >>= num_empty_slots; fix: window = num_empty == 32 ? 0 : window >> num_empty_slots;
Author
Owner

@sphish commented on GitHub (Aug 21, 2025):

Thank you! I'll fix it later.

<!-- gh-comment-id:3209251867 --> @sphish commented on GitHub (Aug 21, 2025): Thank you! I'll fix it later.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepEP#250
No description provided.