mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #2057] runtime: guard null bind callbacks, add owner accessor and unit test suite for DeferredImageBinding (RT-DEFERRED-IMAGE-BINDING-GUARDS-AND-TESTS) #2062
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#2062
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/2057
Author: @abnalstlll-byte
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:feat/rt-deferred-image-binding-guards-and-tests📝 Commits (1)
14e1a35runtime: guard null bind callbacks, add owner accessor and unit test suite for DeferredImageBinding (RT-DEFERRED-IMAGE-BINDING-GUARDS-AND-TESTS)📊 Changes
3 files changed (+151 additions, -1 deletions)
View changed files
📝
runtime/CMakeLists.txt(+5 -0)📝
runtime/src/deferred_image_binding.h(+2 -1)➕
runtime/test/deferred_image_binding_test.cpp(+144 -0)📄 Description
Claimed in the coordination issue as: RT-DEFERRED-IMAGE-BINDING-GUARDS-AND-TESTS (claim)
What and why
runtime/src/deferred_image_binding.hsynchronizes deferred single-time image memory binding across concurrent calls (e.g. from command replay and descriptor table creation).Null callback guard:
ensure(): guards against nullbind_function pointer (if (!bind_ || !bind_(owner_)) return false;), returning false safely instead of crashing.Owner query helper:
owner()accessor returningowner_.Unit test suite (
runtime/test/deferred_image_binding_test.cpp):bound() == false,owner() == target).bound() == false).bound_).bound() == true).ensure()simultaneously; callback executes exactly once, all threads succeed).Registers
deferred_image_binding_testand CTest inruntime/CMakeLists.txt.Tested
28/28 checks passed(0 failures).python -I tests/test_ci_registration.py: 16/16 pass.python -I tests/test_text_write_line_endings.py: 3/3 pass.python -I scripts/check_no_game_data.py: clean (0 violations, no game data).AI-assisted (Claude Code)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.