feat(freetype): implement glyph mutation exports #18482

Merged
B-Howell merged 16 commits from upstream-pr/18482 into main 2026-11-21 16:45:25 +00:00
B-Howell commented 2026-11-11 17:52:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by B-Howell on 2026-11-11T17:52:54Z.


What

Implements the four existing FreeType glyph exports FT_Glyph_To_Bitmap, FT_Glyph_Transform, FT_Glyph_Stroke and FT_Glyph_StrokeBorder (FreeTypeOt NIDs c1nbr8oSWlg, AVEEb57HhUw, 0rKmI1ZbMAc, BBRhYfYBDgU) on top of the shared guest-glyph ownership registry and FreeType's own outline operations. The outline bridge copies guest point data into the native outline before each mutation, and glyph replacement keeps ownership consistent for both the destroy and retain cases. Get/Copy keep wide guest-coordinate values when they publish outlines, while mutation synchronization uses checked conversions.

The regression fixture loads FreeType and FreeTypeOt as a matched raw pair and as a matched patched pair. It covers guest outline edits, mutation and replacement, ownership retention, destruction and invalid-pointer handling through the existing export NIDs. The four cross-library C-linkage host bridges carry the _nid_no_patch suffix in their declarations and definitions, so NID patching keeps the helper names in the patched pair without adding exports or changing the progress denominator.

Tested

  • Head d8c0b9e525f00acd10eb63a47c506eadc3431477 (tree bb2b58149686653df86e21367923564831f49ac5). It merges into current main f57c971559a8dcacdb7b090ad5f4a82b7633ea96 without conflicts. Against that merge, the topic's changes stay limited to libSceFreeType, libSceFreeTypeOt, the new fixture and the two debt files.

  • Windows (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips.

  • WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips.

  • Failing control: the fixture alone (test-only commit 6aecda3111c83c6a4d7b25ac1c06de2360bcc6d6) fails on both matched provider pairs. Each returns 1 at the first sceFreeTypeOtGlyphToBitmap_nid_no_patch marker, with no crash or loader failure.

  • tools/progress.py: four functions move from throwing to implemented; the denominator does not change.

  • Head ce1abd4132fc80f206f57355320857ffa661caf0 merges main 3b7f31fa700b0e9d46dac0d51344330225621bd3 (after #18367) into d8c0b9e5 and takes the FT_Glyph_Stroke_nid_postfix name in Export.cpp, libSceFreeTypeOt.hpp and the fixture's raw-mode symbol. WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips. tools/progress.py against that main: still four functions from throwing to implemented (15069/39230 to 15073/39230), denominator unchanged. Windows was not rerun on this head because the Windows checkout lacks the ICU submodule.

  • Head e3f0f7643711b16063d22db1ab811202f22611e6 merges main d2cea620f831acad16f265479e0fa2d8bf160c53 (after #16497) into ce1abd41 and adds a source-first Publish(const GuestOutline&, const char*) overload in Glyph.cpp that forwards to the existing one, so #16497's FT_New_Glyph call compiles unchanged. WSL Ubuntu (native build): all four focused selectors passed 3/3 each, public_headers passed, and #16497's guest_legacy_freetype_new_glyph and guest_legacy_freetype_new_glyph_nid passed 3/3 each, with zero skips. Windows was not rerun on this head.

  • tools/pr_overlap.py --branch on this head against the open pull requests: 1966 open pull requests probed against main f57c9715. No other open pull request implements any of the four NIDs. #18367 renamed the 0rKmI1ZbMAc stub to FT_Glyph_Stroke_nid_postfix and left it throwing. It has landed, and this branch adopted its name: the implementation now lives in FT_Glyph_Stroke_nid_postfix, and its declaration in libSceFreeTypeOt.hpp carries the full signature. The tool could not merge ten pull requests into the base, so it could not compare them: #10611, #10897, #14212, #15052, #16122, #16497, #16823, #17715, #17776 and #17779. Their diffs at their current heads were compared by hand. #16497 adds FreeTypeNewGlyph in Glyph.cpp with the earlier source-first Publish call. It landed first, so this branch adds the four-line source-first Publish overload its call needs. Its textual conflict is in the debt files. The others implement or rename other FreeTypeOt exports. None adds or removes any of the four NIDs.

  • Debt fragment 2c99586061: merged main c3d38470e0c and moved this PR's debt edits into docs/dev/debt/changes/codex-freetype-glyph-mutations-c340.md; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head. debt_fold.py --check and check_conventions.py --base origin/main pass. Documentation only, no build.

  • Head 5b5816e6db5: ordinary merge of main 01c550960a9 into 2c995860615. The only conflict was in libSceFreeTypeOt.hpp: main implemented FT_New_GlyphSlot (typed declaration now in include/GlyphSlot.hpp), so the old untyped declaration is dropped and this PR's typed FT_Glyph_Stroke_nid_postfix declaration is kept. WSL Ubuntu (native build): guest_freetype_ot_glyph_mutation and guest_freetype_ot_glyph_slot passed (3/3 ctest entries). debt_fold.py --check and check_conventions.py --base origin/main pass. Windows was not rerun on this head.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Prepared with Codex; published by Claude Code.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5264257382 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482). Originally posted by [B-Howell](https://github.com/B-Howell) on 2026-11-11T17:52:54Z. --- ### What Implements the four existing FreeType glyph exports `FT_Glyph_To_Bitmap`, `FT_Glyph_Transform`, `FT_Glyph_Stroke` and `FT_Glyph_StrokeBorder` (FreeTypeOt NIDs `c1nbr8oSWlg`, `AVEEb57HhUw`, `0rKmI1ZbMAc`, `BBRhYfYBDgU`) on top of the shared guest-glyph ownership registry and FreeType's own outline operations. The outline bridge copies guest point data into the native outline before each mutation, and glyph replacement keeps ownership consistent for both the destroy and retain cases. Get/Copy keep wide guest-coordinate values when they publish outlines, while mutation synchronization uses checked conversions. The regression fixture loads FreeType and FreeTypeOt as a matched raw pair and as a matched patched pair. It covers guest outline edits, mutation and replacement, ownership retention, destruction and invalid-pointer handling through the existing export NIDs. The four cross-library C-linkage host bridges carry the `_nid_no_patch` suffix in their declarations and definitions, so NID patching keeps the helper names in the patched pair without adding exports or changing the progress denominator. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - Head `d8c0b9e525f00acd10eb63a47c506eadc3431477` (tree `bb2b58149686653df86e21367923564831f49ac5`). It merges into current `main` `f57c971559a8dcacdb7b090ad5f4a82b7633ea96` without conflicts. Against that merge, the topic's changes stay limited to libSceFreeType, libSceFreeTypeOt, the new fixture and the two debt files. - Windows (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips. - WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips. - Failing control: the fixture alone (test-only commit `6aecda3111c83c6a4d7b25ac1c06de2360bcc6d6`) fails on both matched provider pairs. Each returns 1 at the first `sceFreeTypeOtGlyphToBitmap_nid_no_patch` marker, with no crash or loader failure. - `tools/progress.py`: four functions move from throwing to implemented; the denominator does not change. - Head `ce1abd4132fc80f206f57355320857ffa661caf0` merges `main` `3b7f31fa700b0e9d46dac0d51344330225621bd3` (after #18367) into `d8c0b9e5` and takes the `FT_Glyph_Stroke_nid_postfix` name in `Export.cpp`, `libSceFreeTypeOt.hpp` and the fixture's raw-mode symbol. WSL Ubuntu (native build): all four focused selectors passed 3/3 each and all 65 public-header checks passed, with zero skips. `tools/progress.py` against that `main`: still four functions from throwing to implemented (15069/39230 to 15073/39230), denominator unchanged. Windows was not rerun on this head because the Windows checkout lacks the ICU submodule. - Head `e3f0f7643711b16063d22db1ab811202f22611e6` merges `main` `d2cea620f831acad16f265479e0fa2d8bf160c53` (after #16497) into `ce1abd41` and adds a source-first `Publish(const GuestOutline&, const char*)` overload in `Glyph.cpp` that forwards to the existing one, so #16497's `FT_New_Glyph` call compiles unchanged. WSL Ubuntu (native build): all four focused selectors passed 3/3 each, `public_headers` passed, and #16497's `guest_legacy_freetype_new_glyph` and `guest_legacy_freetype_new_glyph_nid` passed 3/3 each, with zero skips. Windows was not rerun on this head. - `tools/pr_overlap.py --branch` on this head against the open pull requests: 1966 open pull requests probed against `main` `f57c9715`. No other open pull request implements any of the four NIDs. #18367 renamed the `0rKmI1ZbMAc` stub to `FT_Glyph_Stroke_nid_postfix` and left it throwing. It has landed, and this branch adopted its name: the implementation now lives in `FT_Glyph_Stroke_nid_postfix`, and its declaration in `libSceFreeTypeOt.hpp` carries the full signature. The tool could not merge ten pull requests into the base, so it could not compare them: #10611, #10897, #14212, #15052, #16122, #16497, #16823, #17715, #17776 and #17779. Their diffs at their current heads were compared by hand. #16497 adds `FreeTypeNewGlyph` in `Glyph.cpp` with the earlier source-first `Publish` call. It landed first, so this branch adds the four-line source-first `Publish` overload its call needs. Its textual conflict is in the debt files. The others implement or rename other FreeTypeOt exports. None adds or removes any of the four NIDs. - Debt fragment `2c99586061`: merged main `c3d38470e0c` and moved this PR's debt edits into `docs/dev/debt/changes/codex-freetype-glyph-mutations-c340.md`; the debt files match main, and the fragment applied to main gives the same debt lines as the previous head. `debt_fold.py --check` and `check_conventions.py --base origin/main` pass. Documentation only, no build. - Head `5b5816e6db5`: ordinary merge of `main` `01c550960a9` into `2c995860615`. The only conflict was in `libSceFreeTypeOt.hpp`: main implemented `FT_New_GlyphSlot` (typed declaration now in `include/GlyphSlot.hpp`), so the old untyped declaration is dropped and this PR's typed `FT_Glyph_Stroke_nid_postfix` declaration is kept. WSL Ubuntu (native build): `guest_freetype_ot_glyph_mutation` and `guest_freetype_ot_glyph_slot` passed (3/3 ctest entries). `debt_fold.py --check` and `check_conventions.py --base origin/main` pass. Windows was not rerun on this head. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes Prepared with Codex; published by Claude Code.
PrivacyOnion commented 2026-11-12 06:08:23 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-12T06:08:23Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against d8c0b9e525:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3040: guest_freetype_ot_glyph_mutation ...........   Passed    0.03 sec
    2/2 Test #3041: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.03 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3040: guest_freetype_ot_glyph_mutation ...........***Failed    0.01 sec
    2/2 Test #3041: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.02 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified Replace, FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch pass destroy=0 to underlying FreeType operations, keeping host ownership within std::unique_ptr<FT_GlyphRec, decltype(&FT_Done_Glyph)>, properly retaining or erasing oldRoot based on the destroy argument, and returning FT_Err_Invalid_Argument on null glyph handles.
    • core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified FreeTypeGlyphMutationTransformHost_nid_no_patch validates null glyph input before acquiring lock, applies bounds checking to matrix and translation components via Count<FT_Fixed> and Count<FT_Pos>, and updates the guest glyph via owner.Publish only when FT_Glyph_Transform succeeds.
    • core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified Glyph::Sync and Glyph::Publish maintain outline integrity by asserting matching contour and point counts, ensuring tags/contours/points buffer identity and FT_OUTLINE_OWNER flag equality, and converting between 64-bit GuestVector points and native FT_Pos points without data truncation.
    • core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified glyphMutex is consistently acquired across all registration, lookup, synchronization, and replacement critical sections, avoiding deadlocks or TOCTOU races between map modification and FreeType host mutations.
    • core/libs/prx/libSceFreeTypeOt/Export.cpp: Verified exports sceFreeTypeOtUnknown_0rKmI1ZbMAc_nid_no_patch, sceFreeTypeOtGlyphStrokeBorder_nid_no_patch, sceFreeTypeOtGlyphToBitmap_nid_no_patch, and sceFreeTypeOtGlyphTransform_nid_no_patch correctly export NIDs 0rKmI1ZbMAc, BBRhYfYBDgU, c1nbr8oSWlg, and AVEEb57HhUw with APS5_VABI and forward cleanly to libSceFreeType host bridges.
    • docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md: Verified all known gaps regarding console equivalence, FreeType version differences, and ownership behaviors are recorded in technical debt files without extraneous comments in code.
  • Minor: please drop the Generated with footer from the description; the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5869881516 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5869881516). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-12T06:08:23Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `d8c0b9e525`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3040: guest_freetype_ot_glyph_mutation ........... Passed 0.03 sec 2/2 Test #3041: guest_freetype_ot_glyph_mutation_patched ... Passed 0.03 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3040: guest_freetype_ot_glyph_mutation ...........***Failed 0.01 sec 2/2 Test #3041: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.02 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified Replace, FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch pass destroy=0 to underlying FreeType operations, keeping host ownership within std::unique_ptr<FT_GlyphRec, decltype(&FT_Done_Glyph)>, properly retaining or erasing oldRoot based on the destroy argument, and returning FT_Err_Invalid_Argument on null glyph handles. - core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified FreeTypeGlyphMutationTransformHost_nid_no_patch validates null glyph input before acquiring lock, applies bounds checking to matrix and translation components via Count<FT_Fixed> and Count<FT_Pos>, and updates the guest glyph via owner.Publish only when FT_Glyph_Transform succeeds. - core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified Glyph::Sync and Glyph::Publish maintain outline integrity by asserting matching contour and point counts, ensuring tags/contours/points buffer identity and FT_OUTLINE_OWNER flag equality, and converting between 64-bit GuestVector points and native FT_Pos points without data truncation. - core/libs/prx/libSceFreeType/src/Glyph.cpp: Verified glyphMutex is consistently acquired across all registration, lookup, synchronization, and replacement critical sections, avoiding deadlocks or TOCTOU races between map modification and FreeType host mutations. - core/libs/prx/libSceFreeTypeOt/Export.cpp: Verified exports sceFreeTypeOtUnknown_0rKmI1ZbMAc_nid_no_patch, sceFreeTypeOtGlyphStrokeBorder_nid_no_patch, sceFreeTypeOtGlyphToBitmap_nid_no_patch, and sceFreeTypeOtGlyphTransform_nid_no_patch correctly export NIDs 0rKmI1ZbMAc, BBRhYfYBDgU, c1nbr8oSWlg, and AVEEb57HhUw with APS5_VABI and forward cleanly to libSceFreeType host bridges. - docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md: Verified all known gaps regarding console equivalence, FreeType version differences, and ownership behaviors are recorded in technical debt files without extraneous comments in code. - Minor: please drop the `Generated with` footer from the description; the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 20:23:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T20:23:50Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ce1abd4132:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........   Passed    0.01 sec
    2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp, core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........***Failed    0.01 sec
    2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.01 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null.
    • Audited Glyph::Sync and Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming point arrays, tags, contours, advance vectors, and bitmap buffers are validated against host structures before mutation to prevent out-of-bounds access or stale pointer propagation.
    • Verified ownership semantics in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp across destroy=0 and destroy!=0 paths, confirming original glyph handles remain registered and valid when destroy is false and are safely cleaned up without resource leaks when destroy is true.
    • Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow.
    • Audited concurrency safety across all modified exports, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks.
    • Verified strict compliance with AGENTS.md rules across all modified files, ensuring zero comments in code, comprehensive technical debt entries in docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md, and no extraneous repository files.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912735970 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5912735970). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T20:23:50Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `ce1abd4132`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3145: guest_freetype_ot_glyph_mutation ........... Passed 0.01 sec 2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp`, `core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........***Failed 0.01 sec 2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.01 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null. - Audited Glyph::Sync and Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming point arrays, tags, contours, advance vectors, and bitmap buffers are validated against host structures before mutation to prevent out-of-bounds access or stale pointer propagation. - Verified ownership semantics in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp across destroy=0 and destroy!=0 paths, confirming original glyph handles remain registered and valid when destroy is false and are safely cleaned up without resource leaks when destroy is true. - Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow. - Audited concurrency safety across all modified exports, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks. - Verified strict compliance with AGENTS.md rules across all modified files, ensuring zero comments in code, comprehensive technical debt entries in docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md, and no extraneous repository files. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 20:23:50 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T20:23:50Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against ce1abd4132:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........   Passed    0.01 sec
    2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp, core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........***Failed    0.01 sec
    2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.01 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null.
    • Audited Glyph::Sync and Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming point arrays, tags, contours, advance vectors, and bitmap buffers are validated against host structures before mutation to prevent out-of-bounds access or stale pointer propagation.
    • Verified ownership semantics in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp across destroy=0 and destroy!=0 paths, confirming original glyph handles remain registered and valid when destroy is false and are safely cleaned up without resource leaks when destroy is true.
    • Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow.
    • Audited concurrency safety across all modified exports, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks.
    • Verified strict compliance with AGENTS.md rules across all modified files, ensuring zero comments in code, comprehensive technical debt entries in docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md, and no extraneous repository files.
  • Note: the AI-assisted checkbox can stay.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912735983 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5912735983). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T20:23:50Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `ce1abd4132`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3145: guest_freetype_ot_glyph_mutation ........... Passed 0.01 sec 2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp`, `core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3145: guest_freetype_ot_glyph_mutation ...........***Failed 0.01 sec 2/2 Test #3146: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.01 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null. - Audited Glyph::Sync and Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming point arrays, tags, contours, advance vectors, and bitmap buffers are validated against host structures before mutation to prevent out-of-bounds access or stale pointer propagation. - Verified ownership semantics in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp across destroy=0 and destroy!=0 paths, confirming original glyph handles remain registered and valid when destroy is false and are safely cleaned up without resource leaks when destroy is true. - Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow. - Audited concurrency safety across all modified exports, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks. - Verified strict compliance with AGENTS.md rules across all modified files, ensuring zero comments in code, comprehensive technical debt entries in docs/dev/debt/libSceFreeType.md and docs/dev/debt/libSceFreeTypeOt.md, and no extraneous repository files. - Note: the AI-assisted checkbox can stay. Looks Good To Me
PrivacyOnion commented 2026-11-15 21:22:31 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T21:22:31Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against e3f0f76437:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3484: guest_freetype_ot_glyph_mutation ...........   Passed    0.26 sec
    2/2 Test #3485: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.29 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp, core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3485: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.02 sec
    2/2 Test #3484: guest_freetype_ot_glyph_mutation ...........***Failed    0.02 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null.
    • Audited Glyph::Sync and both overloads of Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming that guest outline point modifications are validated and synchronized to native outlines prior to mutation, and published back to the guest glyph structure afterward, while preserving the source-first Publish overload needed by FT_New_Glyph.
    • Verified ownership lifecycle and exception/error safety in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming that FT_Glyph_To_Bitmap, FT_Glyph_Stroke, and FT_Glyph_StrokeBorder calls pass destroy=0 to native FreeType so old native glyphs remain valid on failure and are only erased from the guest registry when destroy!=0 after successful replacement registration.
    • Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow.
    • Audited concurrency safety across all modified exports in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks.
    • Verified strict compliance with AGENTS.md rules across all modified files, with mechanical convention checks and both guest_freetype_ot_glyph_mutation and guest_freetype_ot_glyph_mutation_patched tests passing.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5912993211 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5912993211). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T21:22:31Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `e3f0f76437`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3484: guest_freetype_ot_glyph_mutation ........... Passed 0.26 sec 2/2 Test #3485: guest_freetype_ot_glyph_mutation_patched ... Passed 0.29 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp`, `core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3485: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.02 sec 2/2 Test #3484: guest_freetype_ot_glyph_mutation ...........***Failed 0.02 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, ensuring FT_Err_Invalid_Argument equivalence with upstream FreeType when glyph handles or pointers are null. - Audited Glyph::Sync and both overloads of Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming that guest outline point modifications are validated and synchronized to native outlines prior to mutation, and published back to the guest glyph structure afterward, while preserving the source-first Publish overload needed by FT_New_Glyph. - Verified ownership lifecycle and exception/error safety in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming that FT_Glyph_To_Bitmap, FT_Glyph_Stroke, and FT_Glyph_StrokeBorder calls pass destroy=0 to native FreeType so old native glyphs remain valid on failure and are only erased from the guest registry when destroy!=0 after successful replacement registration. - Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow. - Audited concurrency safety across all modified exports in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks. - Verified strict compliance with AGENTS.md rules across all modified files, with mechanical convention checks and both guest_freetype_ot_glyph_mutation and guest_freetype_ot_glyph_mutation_patched tests passing. Looks Good To Me
PrivacyOnion commented 2026-11-15 23:24:21 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-15T23:24:21Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 2c99586061:

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3485: guest_freetype_ot_glyph_mutation ...........   Passed    0.03 sec
    2/2 Test #3486: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.03 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp, core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3485: guest_freetype_ot_glyph_mutation ...........***Failed    0.02 sec
    2/2 Test #3486: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.02 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming null glyph handles and pointers delegate to upstream FreeType to return FT_Err_Invalid_Argument.
    • Audited Glyph::Sync and both overloads of Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying outline point buffer synchronization, bitmap field updates, and the source-first Publish(const GuestOutline&, const char*) overload required after merging #16497.
    • Verified ownership lifecycle and exception/error safety in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming unique_ptr RAII cleanup for newly created FT_Glyph objects and conditional erasure of oldRoot only when destroy is non-zero after successful registration.
    • Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow.
    • Audited concurrency safety across all modified exports in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks.
    • Verified strict compliance with AGENTS.md rules across all modified files, with mechanical convention checks and both guest_freetype_ot_glyph_mutation and guest_freetype_ot_glyph_mutation_patched tests passing on Linux and Windows.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5913475368 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5913475368). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-15T23:24:21Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `2c99586061`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3485: guest_freetype_ot_glyph_mutation ........... Passed 0.03 sec 2/2 Test #3486: guest_freetype_ot_glyph_mutation_patched ... Passed 0.03 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp`, `core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3485: guest_freetype_ot_glyph_mutation ...........***Failed 0.02 sec 2/2 Test #3486: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.02 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - Verified null pointer handling and error dispatch in FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming null glyph handles and pointers delegate to upstream FreeType to return FT_Err_Invalid_Argument. - Audited Glyph::Sync and both overloads of Glyph::Publish in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying outline point buffer synchronization, bitmap field updates, and the source-first Publish(const GuestOutline&, const char*) overload required after merging #16497. - Verified ownership lifecycle and exception/error safety in Replace in core/libs/prx/libSceFreeType/src/Glyph.cpp, confirming unique_ptr RAII cleanup for newly created FT_Glyph objects and conditional erasure of oldRoot only when destroy is non-zero after successful registration. - Checked integer range verification via the Count helper for FT_Pos and FT_Fixed coordinate/matrix conversions across LP64 (Linux) and LLP64 (Windows) in core/libs/prx/libSceFreeType/src/Glyph.cpp, preventing silent truncation or overflow. - Audited concurrency safety across all modified exports in core/libs/prx/libSceFreeType/src/Glyph.cpp, verifying glyphMutex is held throughout Find, Sync, operation execution, and registry modification critical sections without TOCTOU races or deadlocks. - Verified strict compliance with AGENTS.md rules across all modified files, with mechanical convention checks and both guest_freetype_ot_glyph_mutation and guest_freetype_ot_glyph_mutation_patched tests passing on Linux and Windows. Looks Good To Me
PrivacyOnion commented 2026-11-17 13:45:26 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-17T13:45:26Z.

Review: APPROVED


Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against 5b5816e6db:

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_freetype_ot_glyph_mutation_tests built cleanly.
  • CTest (guest_freetype_ot_glyph_mutation, guest_freetype_ot_glyph_mutation_patched):
    1/2 Test #3673: guest_freetype_ot_glyph_mutation ...........   Passed    0.01 sec
    2/2 Test #3674: guest_freetype_ot_glyph_mutation_patched ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 2
    
  • Negative control: with core/libs/prx/libSceFreeType/include/Api.hpp, core/libs/prx/libSceFreeType/src/Glyph.cpp, core/libs/prx/libSceFreeTypeOt/Export.cpp, core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp reverted to main and the new tests kept, the suite fails:
    1/2 Test #3673: guest_freetype_ot_glyph_mutation ...........***Failed    0.01 sec
    2/2 Test #3674: guest_freetype_ot_glyph_mutation_patched ...***Failed    0.01 sec
    0% tests passed, 2 tests failed out of 2
    
    Restoring the change makes it pass again.
  • Code reading:
    • Verified core/libs/prx/libSceFreeType/src/Glyph.cpp FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch for null/invalid arguments, confirming unwrap to upstream FT operations yielding FT_Err_Invalid_Argument or FT_Err_Invalid_Handle.
    • Audited Glyph::Sync and Glyph::Publish routines in Glyph.cpp to ensure guest coordinate synchronization, point count validations, and bitmap/outline conversions correctly handle both in-place modifications and buffer reallocations.
    • Audited the Replace template in Glyph.cpp for ownership lifecycle semantics, verifying that when destroy is non-zero the oldRoot entry in glyphs is safely erased and the newly allocated replacement root handle is registered and returned.
    • Checked FT_Pos, FT_Fixed, and std::uint16_t bounds checks via Count across LP64 and LLP64 platforms to ensure 64-bit guest coordinate fields do not silently truncate or overflow when passed to FreeType host types.
    • Verified concurrency safety in Glyph.cpp ensuring std::lock_guard glyphMutex protects the registry operations, Find, Sync, Replace, and Publish paths without deadlocks or unprotected state mutations.
    • Confirmed strict adherence to AGENTS.md conventions, absence of illegal inline comments, and proper debt tracking via docs/dev/debt/changes/codex-freetype-glyph-mutations-c340.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5939580052 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-5939580052). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-17T13:45:26Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `5b5816e6db`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_freetype_ot_glyph_mutation_tests` built cleanly. - **CTest** (`guest_freetype_ot_glyph_mutation`, `guest_freetype_ot_glyph_mutation_patched`): ``` 1/2 Test #3673: guest_freetype_ot_glyph_mutation ........... Passed 0.01 sec 2/2 Test #3674: guest_freetype_ot_glyph_mutation_patched ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 2 ``` - **Negative control**: with `core/libs/prx/libSceFreeType/include/Api.hpp`, `core/libs/prx/libSceFreeType/src/Glyph.cpp`, `core/libs/prx/libSceFreeTypeOt/Export.cpp`, `core/libs/prx/libSceFreeTypeOt/libSceFreeTypeOt.hpp` reverted to `main` and the new tests kept, the suite fails: ``` 1/2 Test #3673: guest_freetype_ot_glyph_mutation ...........***Failed 0.01 sec 2/2 Test #3674: guest_freetype_ot_glyph_mutation_patched ...***Failed 0.01 sec 0% tests passed, 2 tests failed out of 2 ``` Restoring the change makes it pass again. - **Code reading**: - Verified core/libs/prx/libSceFreeType/src/Glyph.cpp FreeTypeGlyphMutationToBitmapHost_nid_no_patch, FreeTypeGlyphMutationTransformHost_nid_no_patch, FreeTypeGlyphMutationStrokeHost_nid_no_patch, and FreeTypeGlyphMutationStrokeBorderHost_nid_no_patch for null/invalid arguments, confirming unwrap to upstream FT operations yielding FT_Err_Invalid_Argument or FT_Err_Invalid_Handle. - Audited Glyph::Sync and Glyph::Publish routines in Glyph.cpp to ensure guest coordinate synchronization, point count validations, and bitmap/outline conversions correctly handle both in-place modifications and buffer reallocations. - Audited the Replace template in Glyph.cpp for ownership lifecycle semantics, verifying that when destroy is non-zero the oldRoot entry in glyphs is safely erased and the newly allocated replacement root handle is registered and returned. - Checked FT_Pos, FT_Fixed, and std::uint16_t bounds checks via Count<T> across LP64 and LLP64 platforms to ensure 64-bit guest coordinate fields do not silently truncate or overflow when passed to FreeType host types. - Verified concurrency safety in Glyph.cpp ensuring std::lock_guard glyphMutex protects the registry operations, Find, Sync, Replace, and Publish paths without deadlocks or unprotected state mutations. - Confirmed strict adherence to AGENTS.md conventions, absence of illegal inline comments, and proper debt tracking via docs/dev/debt/changes/codex-freetype-glyph-mutations-c340.md. Looks Good To Me
MarcZX10 commented 2026-11-21 04:37:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T04:37:22Z.

Review: APPROVED


Reviewed — looks good

Nothing blocks this; the points below are optional.

What I ran

Reviewed head f9aa2902ce7c33bf149ce9992d1008286fafb064. No commands or tests were run in this review; the test results below are author-reported.

Results

Check Result Note
Code review passed All seven changed files read
Test execution not run Author reports focused tests passed

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests were run in this review. I did not verify console prototypes, FreeType version equivalence, or console behavior; the debt entry also records these as unverified. No changed files were excluded. The description reports WSL test runs at earlier heads and says Windows was not rerun on the latest head.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6002867415 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/18482#pullrequestreview-6002867415). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T04:37:22Z. **Review:** APPROVED --- # Reviewed — looks good Nothing blocks this; the points below are optional. ## What I ran Reviewed head `f9aa2902ce7c33bf149ce9992d1008286fafb064`. No commands or tests were run in this review; the test results below are author-reported. ## Results | Check | Result | Note | |---|---|---| | Code review | passed | All seven changed files read | | Test execution | not run | Author reports focused tests passed | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests were run in this review. I did not verify console prototypes, FreeType version equivalence, or console behavior; the debt entry also records these as unverified. No changed files were excluded. The description reports WSL test runs at earlier heads and says Windows was not rerun on the latest head. ## To get this to a good state Nothing is required.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!18482
No description provided.