Skip to content

Fix the size limit of get_allocate_tasks in chunk engine#401

Merged
SF-Zhou merged 1 commit into
mainfrom
SF-Zhou-patch-1
Mar 9, 2026
Merged

Fix the size limit of get_allocate_tasks in chunk engine#401
SF-Zhou merged 1 commit into
mainfrom
SF-Zhou-patch-1

Conversation

@SF-Zhou

@SF-Zhou SF-Zhou commented Mar 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a potential runtime panic in get_allocate_tasks where collecting more than 3 compact tasks from 11 allocators into an ArrayVec with capacity 3 would cause a panic. The fix switches to TinyVec, which can spill to the heap when the inline capacity is exceeded.

Changes:

  • Changed the return type of get_allocate_tasks from tinyvec::ArrayVec<[GroupId; 3]> to tinyvec::TinyVec<[GroupId; 3]> to support more than 3 results without panicking.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@SF-Zhou SF-Zhou merged commit 1831776 into main Mar 9, 2026
5 checks passed
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