mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:15:51 +01:00
[PR #2310] queue_families: select earliest slot in pick_queue_slot when all slots are UINT32_MAX #2313
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2313
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2310
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-queue-families-slot-max📝 Commits (1)
bddeb09queue_families: select earliest slot in pick_queue_slot when all slots are UINT32_MAX📊 Changes
2 files changed (+40 additions, -1 deletions)
View changed files
📝
runtime/src/queue_families.h(+1 -1)➕
runtime/test/queue_families_test.cpp(+39 -0)📄 Description
Fixes an edge case in
leonida::pick_queue_slot()(runtime/src/queue_families.h):fewestwas initialized toUINT32_MAXand updated only whenusers[i] < fewest. If every slot in non-empty pools hadUINT32_MAXusers,pick_queue_slot()returned{SIZE_MAX, 0}(the sentinel meaning every pool is empty).chosen.pool == SIZE_MAX || users[i] < fewestso the earliest available slot is always selected when at least one pool is non-empty.runtime/test/queue_families_test.cpp.Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Wextra -Werror -pedantic -Iruntime/src runtime/test/queue_families_test.cpppassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Wextra -Werror -pedantic -Iruntime/src runtime/test/queue_families_test.cpppassedsat.pool == 1 && sat.index == 0, exit 1) against unmodifiedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/src/queue_families.h runtime/test/queue_families_test.cppcleanClaimed in the coordination issue as: RT-QUEUE-FAMILIES-SLOT-MAX (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193699762)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.