mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:45:54 +01:00
[PR #2331] d3d12_title_image_census: guard null entries/resources and use stable_sort #2335
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#2335
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/2331
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-title-image-census-guards📝 Commits (1)
d11cbccd3d12_title_image_census: guard null entries/resources and use stable_sort📊 Changes
2 files changed (+76 additions, -2 deletions)
View changed files
📝
runtime/shims/d3d12_title_image_census.h(+4 -2)➕
runtime/test/d3d12_title_image_census_test.cpp(+72 -0)📄 Description
Fixes null-pointer dereferences and non-deterministic tie-breaking in
rt::d3d12::log_title_image_uses()(runtime/shims/d3d12_title_image_census.h):!t) in both passes overtexturesbefore dereferencingt->owned/t->cpu.!t->resourcebefore dereferencingt->resource->desc()for placed entries.std::stable_sortinstead ofstd::sortwhen rankingclasses(copied from an orderedstd::map<Shape, AllocationClass>) so equal-sized shapes break ties deterministically.runtime/test/d3d12_title_image_census_test.cpp.Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Wextra -Werror -pedantic runtime/test/d3d12_title_image_census_test.cpppassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Wextra -Werror -pedantic runtime/test/d3d12_title_image_census_test.cpppassedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/shims/d3d12_title_image_census.h runtime/test/d3d12_title_image_census_test.cppcleanClaimed in the coordination issue as: RT-TITLE-IMAGE-CENSUS-NULL-GUARDS (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7194035099)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.