refactor(libharfbuzz): report guest-input throws as faults #23897
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/23897"
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?
Imported from boykopovar/AnyPS5. Originally posted by monika-runtime on 2026-11-19T21:14:37Z.
What
The seven libharfbuzz exports that still reached
NotImplemented_nid_no_patchforward every valid input to the pinned HarfBuzz 10.0.1; their remaining throws guard null handles, unreadable or unwritable guest pointers and buffers, a foreign or finalized FreeType face, a null blob with a nonzero length, an out-of-range memory mode, or a failure to load the bundled ICU data.This moves the 22 guest-input sites to
GuestFault_nid_no_patchand replaces the ICU-data failure with a plainthrow std::runtime_error("HarfBuzz ICU NFC data failed to load"):hb_icu_get_unicode_funcsis implemented, and that failure is a host-resource failure, so neitherNotImplemented("not implemented") norGuestFault("guest input the console does not define") describes it.tools/progress.pycounts both as throws, so libharfbuzz goes from 30 of 37 on currentmainto 37 of 37.Sites and their justification, checked against
3rdparty/harfbuzzat the pinned 10.0.1 commit:Export.cpphb_ft_face_create_cached(6): null face (hb-ft.ccdereferencesft_face->generic/stream), unreadable guest record, a record without a live AnyPS5 FreeType owner (foreign layout), unreadable owner fields or a null/finalized host face (releasedFT_Face), and the two unwritablegenericcopies.Shaping.cpphb_shape(3): null buffer (hb-shape.ccreadsbuffer->len), null font or a null feature array of nonzero length (nullhb_memcpysource inhb-shape-plan.cc), and an unreadable feature array.Lifecycle.cpphb_blob_create(1): null data with a nonzero length below 2 GiB (stored and later read), and an out-of-range memory mode (out-of-range enum conversion, no upstream behaviour). A length of 2 GiB or more is upstream-rejected and is not faulted.Layout.cpp(12): null faces, unreadable caller counts, a null tag array with a nonzero count, and the host-write bracket and later writes over unwritable count/tag/index buffers. A nullcountorindexis documented as optional and is not faulted.Buffer.cpp(1): the bundled ICU data load, a plain throw as described above.No control flow changes; the same inputs throw at the same points. No technical-debt entry changes, so no fragment.
This depends on the
GuestFault_nid_no_patchhelper (#23391); it is part of #23391's per-library migration.Tested
Linux x86-64, GCC 16.2.1, Release build:
cmake --build build --target guest_harfbuzz_tests guest_harfbuzz_buffer_tests guest_harfbuzz_font_tests: builds and links.ctest --test-dir build -R 'harfbuzz': 19 of 19 tests pass.python3 -I tools/progress.py --module libharfbuzz --json: 37 of 37 (100.0%); currentmainreports 30 of 37.python3 -I tools/tests/test_progress.py: 81 tests, OK.python3 -I tools/tests/test_progress_wrappers.py: 13 tests, OK.python3 tools/check_conventions.py --base upstream/main: all checks passed.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)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T12:07:38Z.
Review: APPROVED
Reviewed — looks good
Nothing blocks this change; the reported test results are author-reported, and the inspected changes are consistent with the stated guest-fault classification.
What I ran
Reviewed head
7c142c5a411aa400a5767b52f0d19c975e2ac052. Usedrepo_read.pyto inspect the prepared description, commits, manifest, diff, changed source ranges, and progress scanner context. No commands or tests were run; no merged-preview check was performed.Results
Findings
Blocking
None.
Non-blocking
None.
Not verified
No runtime behavior, build, or test was independently verified. The description reports Linux x86-64 GCC 16.2.1 Release builds and test suites; those results were not reproduced here. All 11 changed files listed in the manifest were read; no changed files were excluded.
To get this to a good state
Nothing is required.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-22T20:10:26Z.
Review: COMMENTED
Reviewed — no blocking findings
Nothing in the inspected changes shows a blocking defect; the review is incomplete because the PR’s changed-file contents were not all read, so approval is not justified.
What I ran
674a36a2f486c81f6b8bb7a8cc98c6e8425e2160and read the listed changed files throughrepo_read.py.Results
Findings
Blocking
None identified in the code read.
Non-blocking
None.
Not verified
AGENTS.md,CONTRIBUTING.md,core/libs/prx/libc/include/General.hpp,core/libs/prx/libc/src/General.cpp(changed lines),core/libs/prx/libharfbuzz/Buffer.cpp,core/libs/prx/libharfbuzz/Export.cpp,core/libs/prx/libharfbuzz/Layout.cpp,core/libs/prx/libharfbuzz/Lifecycle.cpp,core/libs/prx/libharfbuzz/Shaping.cpp, andtools/progress.py(changed lines); also readdescription.md,commits.md,manifest.json, anddiff.patch.docs/dev/PROGRESS.mdandtools/tests/test_progress.py.To get this to a good state
Nothing is required.
Pull request closed