Repository navigation
test(libharfbuzz): cover guest parent blob lifetime across backend sub-blobs - #23765
Merged
oneandonlydean merged 1 commit intoNov 19, 2026
Conversation
PrivacyOnion
approved these changes
Nov 19, 2026
PrivacyOnion
left a comment
Contributor
There was a problem hiding this comment.
Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 6638b1e394:
- Conventions:
tools/check_conventions.pypassed. - Build:
guest_harfbuzz_lifecycle_testsbuilt cleanly. - CTest (
guest_harfbuzz_lifecycle):1/1 Test #5483: guest_harfbuzz_lifecycle ......... Passed 0.02 sec 100% tests passed, 0 tests failed out of 1 - Code reading:
- Verified core/libs/tests/GuestHarfBuzzLifecycle.cpp:CheckSubBlobLifetime correctly creates parent blob with HB_MEMORY_MODE_READONLY and verifies parent data with CheckData
- Verified hb_blob_create_sub_blob offsets (1, 4) and (5, 10) are valid, with HarfBuzz clamping the second sub-blob from length 10 to 3 matching remaining buffer size (8 - 5 = 3)
- Verified sequential hb_blob_destroy calls on parent, first, and second sub-blobs assert owner.destroyed remains 0 until the final sub-blob is destroyed (owner.destroyed == 1)
- Verified no comments in modified code, adhering strictly to AGENTS.md rules
- Verified test integration into main() runner across both unpatched and NID-patched modes
Looks Good To Me
ycbuzi
added a commit
to ycbuzi/AnyPS5
that referenced
this pull request
Nov 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Extend
core/libs/tests/GuestHarfBuzzLifecycle.cppwithCheckSubBlobLifetime(const Api& api)to verify parent blob lifetime when backendhb_blob_create_sub_blobholds child slices across named and NID-patched test modes:api.blobwithHB_MEMORY_MODE_READONLYover an owned byte buffer, localOwnerstate, and trackedAPS5_VABIDestroycallback.hb_blob_create_sub_blob, including a boundary slice whose requested length (10) is clamped by HarfBuzz to3, verifying expected slice bytes.parentreference and then each sub-blob sequentially, assertingowner.destroyed == 0while either sub-blob remains readable andowner.destroyed == 1only when the last sub-blob is destroyed.Tested
Linux 7.0.0-43-generic x86_64,g++ 15.2.0):ctest --test-dir build --output-on-failure -V -R '^guest_harfbuzz_lifecycle(_nid)?$'(3/3 runs Passed2/2,0.01 secand0.00 seceach)ctest --test-dir build --output-on-failure -V -R '^public_headers$'(Passed,11.86 sec)python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/mainpassedHB_MEMORY_MODE_READONLYtoHB_MEMORY_MODE_DUPLICATEinLifecycle.cppwithCheckSubBlobLifetimeordered first aborted both unpatched and patched tests deterministically atGuestHarfBuzzLifecycle.cpp:157(exit8), then passed after restoring both filesDESKTOP-O0J3UDR,Microsoft Windows NT 10.0.22631.0, MSYS2g++.exe 16.2.0):ctest --test-dir b --output-on-failure -V -R "^guest_harfbuzz_lifecycle(_nid)?$"(3/3 runs Passed2/2:0.59s/0.25s,0.03s/0.03s,0.03s/0.04s)Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)