Skip to content

[bugfix] get_allocate_tasks: more than 3 allocator have compact tasks will cause crash#311

Closed
YuqqiZhou wants to merge 1 commit into
deepseek-ai:mainfrom
YuqqiZhou:main
Closed

[bugfix] get_allocate_tasks: more than 3 allocator have compact tasks will cause crash#311
YuqqiZhou wants to merge 1 commit into
deepseek-ai:mainfrom
YuqqiZhou:main

Conversation

@YuqqiZhou

Copy link
Copy Markdown
Contributor

fix the magic number 3 to CHUNK_SIZE_NUMBER

@YuqqiZhou YuqqiZhou changed the title fix bug in get_allocate_tasks. when more than 3 allocate has compact … [bugfix] get_allocate_tasks: more than 3 allocator have compact tasks will cause crash Jul 9, 2025
@SF-Zhou

SF-Zhou commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

The tinyvec::ArrayVec<[GroupId; 3]> does not mean the vec can only hold 3 elements. It indicates that when the number of elements does not exceed 3, the data is stored on the stack, and it is expected not to crash. If you encounter a crash, feel free to share the specific logs.

@SF-Zhou SF-Zhou closed this Sep 10, 2025
@SF-Zhou

SF-Zhou commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

I realized I used the wrong data structure—I should have used tinyvec::TinyVec, which automatically migrates data to the stack when the capacity is exceeded. You're right, Thanks!

The new fix is submitted at #401.

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