feat(libSceLibcInternal): implement istreambuf_iterator equal #23809

Open
GiannisG1 wants to merge 3 commits from upstream-pr/23809 into main
GiannisG1 commented 2026-11-19 17:35:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by GiannisG1 on 2026-11-19T17:35:33Z.


What

std::istreambuf_iterator<char>::equal and std::istreambuf_iterator<wchar_t>::equal threw:

  • the char form through a parameterless placeholder in InventoryExports2.cpp;
  • the wchar_t form through the unnamed alias sceLibcInternalUnknown_jZmLD_ASDto. Its mangled name _ZNKSt19istreambuf_iteratorIwSt11char_traitsIwEE5equalERKS2_ hashes to that NID (tools/nid_names.py), so it is now exported by name like the char form.

Both now follow Microsoft STL's istreambuf_iterator::equal (stl/inc/iterator), the commit TimeGetFields.cpp already derives from, and C++ [istreambuf.iterator.ops]:

  • each iterator not yet fetched is peeked through its streambuf's get area or underflow;
  • the two are equal when both or neither are at end-of-stream, whatever streambuf they read.

The functions reuse the Peek/Equal helpers time_get already uses on the same 16-byte iterator layout: the buffer at 0, the fetched flag at 8 and the element at 9 or 10. So the exports are in TimeGetFields.cpp, between the _Getint and do_get_time exports, where no open PR changes lines. A null iterator throws std::invalid_argument: it is an invalid argument, not an unimplemented path, and tools/progress.py counts a reachable NotImplemented_nid_no_patch as a stub. The debt entry "Additional 3.20 imports" keeps only bad_exception::_Doraise.

std::string text(std::istreambuf_iterator<char>(file), {}), the usual way to read a whole stream, compares through equal. No title was seen calling it.

Tested

Linux Mint 22.3, GCC 13.3.0, Release, head on main e4cee4952b.

Rebased again 2026-11-21 onto main 3bf7091b75, after #19359 (head 3b30cf23cc): #19359 removed the wide basic_string _Xlen/_Xran placeholders right before ours in InventoryExports2.cpp, so all four are gone; git range-diff shows no changed patch line. On that head the 81 libc tests pass 3/3, and the split suite matches main's failures (GTX 1050 Ti 0; HD 630 the same 9 plus agc_driver_frame_replay_rewind_copy, intermittent, #22028; llvmpipe the same 3). The checkers and debt_fold.py --check are clean.

Rebased again 2026-11-20 onto main e481b13555, after #24043 (head 9c5dbdd66e). The patch is unchanged except for two lines that #24043 made obsolete:

  • InventoryExports2.cpp: #24043 removed the _Doraise placeholder right before ours, so all three placeholders are now gone.
  • Debt: #24043's pending fragment changed the "Additional 3.20 imports" entry u6UfGT9+HEA to list only the two equal exports, and this PR implements both. So that entry now has no function left: its ## change becomes ## remove u6UfGT9+HEA, and this PR's own fragment, which changed the same entry, is gone. debt_fold.py --check is clean, and the entry count drops by one.
  • On that head: the 81 guest_libc_internal_*, istreambuf and time_get tests pass 3/3. Split suite: GTX 1050 Ti 0 failed; HD 630 and llvmpipe exactly the failures of main 42f6354612's own run (HD 630 9, llvmpipe 3, all claimed by open pull requests). check_conventions.py, check_test_registration.py, check_main_sync.py (merges cleanly), check_compile.py, debt_fold.py --check and git diff --check are clean, and progress.py --module libSceLibcInternal lists both exports as done.

Rebased 2026-11-20 onto main f57cd3aafc (head 1f5e30197d): #23988 changed _Getloctxt's declaration next to ours in TimeGetFields.hpp, the only conflict. The patch itself is unchanged (git range-diff: no changed patch line, same diffstat). On the rebased head: the 79 guest_libc_internal_* and time_get tests pass 3/3, including both above. Split suite on that head: GTX 1050 Ti 6353 run, 1 failed; HD 630 1472 GPU tests, 10 failed; llvmpipe 1472, 4 failed. Apart from guest_kernel_socket_broadcast_debug_route_bounds, the failures are those of this machine's other runs today and of main's Linux job (HD 630: the 9 of main 0626a8334f; llvmpipe: agc_driver_image_gather_lod, agc_driver_image_table_packed_guards, agc_driver_scattered_runs). That test came to main today in #21149, aborts on every device here and calls only libkernel's socket options; the checkers below are clean again, and progress.py lists neither export as pending. The results below are from the first head.

  • New test guest_libc_internal_istreambuf_equal, for char and wchar_t:
    • two end-of-stream iterators are equal;
    • an iterator with input left differs from end-of-stream, both ways round, for a streambuf with a get area and one read only through underflow. The peeked element is kept, uflow is never called, and a second comparison does not call underflow again;
    • an iterator whose streambuf is at end-of-file equals end-of-stream, and its buffer pointer is cleared;
    • two iterators with input left on different streambufs are equal;
    • a null iterator on either side throws std::invalid_argument.
  • main: the test does not link (no wchar_t export). With the wchar_t half removed it aborts: _ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix not implemented. This PR: passes 3/3.
  • Split suite on this build (tools/suite.py): GPU tests on a GTX 1050 Ti (NVIDIA 580.178.04), an HD 630 (Mesa 25.2.8 ANV) and llvmpipe 25.2.8, everything else once.
    • guest_libc_internal_istreambuf_equal and guest_libc_internal_time_get_fields pass.
    • The failures are those of the main baseline (HD 630 10, llvmpipe 3) plus two timing tests that do not load libSceLibcInternal.
    • agc_driver_pm4_order_signal checks for a median below 0.1 ms. Run interleaved with a main e4cee4952b build, 5 times per GPU, both builds fail 7 of 15.
    • agc_driver_depth_fast_clear_submit failed on the GTX and passes 3/3 alone.
  • After the suite, the null checks changed from NotImplemented_nid_no_patch to std::invalid_argument (head d94b629435), so the progress report counts both exports as implemented. On that tree, public_headers and its compile tests, every guest_libc_internal_* test and the conventions and checker tests (344) pass. progress.py --module libSceLibcInternal lists neither export as pending.
  • check_conventions.py, check_test_registration.py, check_main_sync.py (merges cleanly), check_compile.py and debt_fold.py --check are clean.
  • pr_overlap.py --branch found two cases, both checked:
    • #17300 (rename-only) names the same wchar_t alias.
    • #22528 shared lines in TimeGetFields.cpp with an earlier placement of these exports. They were moved, and git merge-tree with #22528, #22462 and #22370 is now clean.
    • #24043 (bad_exception::_Doraise) removed placeholder rows next to ours in InventoryExports2.cpp; it is merged and resolved above.
    • #19359 (wide basic_string _Xlen/_Xran) removed the placeholders right before ours in InventoryExports2.cpp; it is merged and resolved above.
    • For the PRs it could not compare because they conflict with main, a trial merge adds no conflicting file. #18135 deletes the declarations around the removed equal declaration in InventoryExports2.hpp, a file where it already conflicts with main.

Update 2026-11-25 (head 352c5ae5af): main d237f5d065 is merged into the branch on top of oneandonlydean's merge (b1acaec95b). The one conflict, in TimeGetFields.hpp, keeps both sides' declarations. On this head, guest_libc_internal_istreambuf_equal, guest_libc_internal_time_get and guest_libc_internal_time_get_fields pass 3/3 on the GTX 1050 Ti, the HD 630, llvmpipe and lavapipe. The split suite (-j2, SPIRV-Tools ON) matches our main d237f5d065 run with the same configuration. The checkers are clean, and the branch merges cleanly with main.

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 and the licence notice of code adapted from upstream (see AGENTS.md)
  • 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

🤖 Generated with Claude Code

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5399885529 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809). Originally posted by [GiannisG1](https://github.com/GiannisG1) on 2026-11-19T17:35:33Z. --- ### What `std::istreambuf_iterator<char>::equal` and `std::istreambuf_iterator<wchar_t>::equal` threw: - the `char` form through a parameterless placeholder in `InventoryExports2.cpp`; - the `wchar_t` form through the unnamed alias `sceLibcInternalUnknown_jZmLD_ASDto`. Its mangled name `_ZNKSt19istreambuf_iteratorIwSt11char_traitsIwEE5equalERKS2_` hashes to that NID (`tools/nid_names.py`), so it is now exported by name like the `char` form. Both now follow Microsoft STL's [`istreambuf_iterator::equal`](https://github.com/microsoft/STL/blob/770da5aa457af11f0a796600e1aa6f7f6fce14a6/stl/inc/iterator) (`stl/inc/iterator`), the commit `TimeGetFields.cpp` already derives from, and C++ [istreambuf.iterator.ops]: - each iterator not yet fetched is peeked through its streambuf's get area or `underflow`; - the two are equal when both or neither are at end-of-stream, whatever streambuf they read. The functions reuse the `Peek`/`Equal` helpers `time_get` already uses on the same 16-byte iterator layout: the buffer at 0, the fetched flag at 8 and the element at 9 or 10. So the exports are in `TimeGetFields.cpp`, between the `_Getint` and `do_get_time` exports, where no open PR changes lines. A null iterator throws `std::invalid_argument`: it is an invalid argument, not an unimplemented path, and `tools/progress.py` counts a reachable `NotImplemented_nid_no_patch` as a stub. The debt entry "Additional 3.20 imports" keeps only `bad_exception::_Doraise`. `std::string text(std::istreambuf_iterator<char>(file), {})`, the usual way to read a whole stream, compares through `equal`. No title was seen calling it. ### Tested Linux Mint 22.3, GCC 13.3.0, Release, head on `main` `e4cee4952b`. **Rebased again 2026-11-21** onto `main` `3bf7091b75`, after #19359 (head `3b30cf23cc`): #19359 removed the wide `basic_string` `_Xlen`/`_Xran` placeholders right before ours in `InventoryExports2.cpp`, so all four are gone; `git range-diff` shows no changed patch line. On that head the 81 libc tests pass 3/3, and the split suite matches `main`'s failures (GTX 1050 Ti 0; HD 630 the same 9 plus `agc_driver_frame_replay_rewind_copy`, intermittent, #22028; llvmpipe the same 3). The checkers and `debt_fold.py --check` are clean. **Rebased again 2026-11-20** onto `main` `e481b13555`, after #24043 (head `9c5dbdd66e`). The patch is unchanged except for two lines that #24043 made obsolete: - `InventoryExports2.cpp`: #24043 removed the `_Doraise` placeholder right before ours, so all three placeholders are now gone. - Debt: #24043's pending fragment changed the "Additional 3.20 imports" entry `u6UfGT9+HEA` to list only the two `equal` exports, and this PR implements both. So that entry now has no function left: its `## change` becomes `## remove u6UfGT9+HEA`, and this PR's own fragment, which changed the same entry, is gone. `debt_fold.py --check` is clean, and the entry count drops by one. - On that head: the 81 `guest_libc_internal_*`, `istreambuf` and `time_get` tests pass 3/3. Split suite: GTX 1050 Ti 0 failed; HD 630 and llvmpipe exactly the failures of `main` `42f6354612`'s own run (HD 630 9, llvmpipe 3, all claimed by open pull requests). `check_conventions.py`, `check_test_registration.py`, `check_main_sync.py` (merges cleanly), `check_compile.py`, `debt_fold.py --check` and `git diff --check` are clean, and `progress.py --module libSceLibcInternal` lists both exports as done. **Rebased 2026-11-20** onto `main` `f57cd3aafc` (head `1f5e30197d`): #23988 changed `_Getloctxt`'s declaration next to ours in `TimeGetFields.hpp`, the only conflict. The patch itself is unchanged (`git range-diff`: no changed patch line, same diffstat). On the rebased head: the 79 `guest_libc_internal_*` and `time_get` tests pass 3/3, including both above. Split suite on that head: GTX 1050 Ti 6353 run, 1 failed; HD 630 1472 GPU tests, 10 failed; llvmpipe 1472, 4 failed. Apart from `guest_kernel_socket_broadcast_debug_route_bounds`, the failures are those of this machine's other runs today and of `main`'s Linux job (HD 630: the 9 of `main` `0626a8334f`; llvmpipe: `agc_driver_image_gather_lod`, `agc_driver_image_table_packed_guards`, `agc_driver_scattered_runs`). That test came to `main` today in #21149, aborts on every device here and calls only libkernel's socket options; the checkers below are clean again, and `progress.py` lists neither export as pending. The results below are from the first head. - New test `guest_libc_internal_istreambuf_equal`, for `char` and `wchar_t`: - two end-of-stream iterators are equal; - an iterator with input left differs from end-of-stream, both ways round, for a streambuf with a get area and one read only through `underflow`. The peeked element is kept, `uflow` is never called, and a second comparison does not call `underflow` again; - an iterator whose streambuf is at end-of-file equals end-of-stream, and its buffer pointer is cleared; - two iterators with input left on different streambufs are equal; - a null iterator on either side throws `std::invalid_argument`. - `main`: the test does not link (no `wchar_t` export). With the `wchar_t` half removed it aborts: `_ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix not implemented`. This PR: passes 3/3. - Split suite on this build (`tools/suite.py`): GPU tests on a GTX 1050 Ti (NVIDIA 580.178.04), an HD 630 (Mesa 25.2.8 ANV) and llvmpipe 25.2.8, everything else once. - `guest_libc_internal_istreambuf_equal` and `guest_libc_internal_time_get_fields` pass. - The failures are those of the `main` baseline (HD 630 10, llvmpipe 3) plus two timing tests that do not load libSceLibcInternal. - `agc_driver_pm4_order_signal` checks for a median below 0.1 ms. Run interleaved with a `main` `e4cee4952b` build, 5 times per GPU, both builds fail 7 of 15. - `agc_driver_depth_fast_clear_submit` failed on the GTX and passes 3/3 alone. - After the suite, the null checks changed from `NotImplemented_nid_no_patch` to `std::invalid_argument` (head `d94b629435`), so the progress report counts both exports as implemented. On that tree, `public_headers` and its compile tests, every `guest_libc_internal_*` test and the conventions and checker tests (344) pass. `progress.py --module libSceLibcInternal` lists neither export as pending. - `check_conventions.py`, `check_test_registration.py`, `check_main_sync.py` (merges cleanly), `check_compile.py` and `debt_fold.py --check` are clean. - `pr_overlap.py --branch` found two cases, both checked: - #17300 (rename-only) names the same `wchar_t` alias. - #22528 shared lines in `TimeGetFields.cpp` with an earlier placement of these exports. They were moved, and `git merge-tree` with #22528, #22462 and #22370 is now clean. - #24043 (`bad_exception::_Doraise`) removed placeholder rows next to ours in `InventoryExports2.cpp`; it is merged and resolved above. - #19359 (wide `basic_string` `_Xlen`/`_Xran`) removed the placeholders right before ours in `InventoryExports2.cpp`; it is merged and resolved above. - For the PRs it could not compare because they conflict with `main`, a trial merge adds no conflicting file. #18135 deletes the declarations around the removed `equal` declaration in `InventoryExports2.hpp`, a file where it already conflicts with `main`. **Update 2026-11-25 (head `352c5ae5af`):** `main` `d237f5d065` is merged into the branch on top of oneandonlydean's merge (`b1acaec95b`). The one conflict, in `TimeGetFields.hpp`, keeps both sides' declarations. On this head, `guest_libc_internal_istreambuf_equal`, `guest_libc_internal_time_get` and `guest_libc_internal_time_get_fields` pass 3/3 on the GTX 1050 Ti, the HD 630, llvmpipe and lavapipe. The split suite (`-j2`, SPIRV-Tools ON) matches our `main` `d237f5d065` run with the same configuration. The checkers are clean, and the branch merges cleanly with `main`. ### 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) and the licence notice of code adapted from upstream (see AGENTS.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 🤖 Generated with [Claude Code](https://claude.com/claude-code)
PrivacyOnion commented 2026-11-19 17:58:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T17:58:02Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_istreambuf_equal_tests built cleanly.
  • CTest (guest_libc_internal_istreambuf_equal):
    1/1 Test #4430: guest_libc_internal_istreambuf_equal ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports2.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/InventoryExports2.hpp, core/libs/prx/libSceLibcInternal/include/TimeGetFields.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Verified signature and VABI calling convention of _ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix and wchar_t variant in TimeGetFields.cpp, matching GuestLocale::InputIterator pointer parameters and bool return type.
    • Verified null pointer validation via RequireArgument(self != nullptr && right != nullptr, func) throwing through NotImplemented_nid_no_patch as standard in libSceLibcInternal.
    • Verified Equal implementation in TimeGetFields.cpp correctly peeks uninitialized iterators and compares stream buffer nullness per C++ [istreambuf.iterator.ops] specifications.
    • Verified that character types (char and uint16_t for wchar_t) are properly handled without signedness truncation or LLP64/LP64 mismatch.
    • Verified CMakeLists.txt target configurations, test suite assertions in GuestLibcInternalIstreambufEqual.cpp, and debt fragment in docs/dev/debt/changes/feat-libcinternal-istreambuf-equal.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5980492829 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-5980492829). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-19T17:58:02Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `03f42644fb`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_istreambuf_equal_tests` built cleanly. - **CTest** (`guest_libc_internal_istreambuf_equal`): ``` 1/1 Test #4430: guest_libc_internal_istreambuf_equal ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports2.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports2.hpp`, `core/libs/prx/libSceLibcInternal/include/TimeGetFields.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Verified signature and VABI calling convention of _ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix and wchar_t variant in TimeGetFields.cpp, matching GuestLocale::InputIterator pointer parameters and bool return type. - Verified null pointer validation via RequireArgument(self != nullptr && right != nullptr, __func__) throwing through NotImplemented_nid_no_patch as standard in libSceLibcInternal. - Verified Equal<TChar> implementation in TimeGetFields.cpp correctly peeks uninitialized iterators and compares stream buffer nullness per C++ [istreambuf.iterator.ops] specifications. - Verified that character types (char and uint16_t for wchar_t) are properly handled without signedness truncation or LLP64/LP64 mismatch. - Verified CMakeLists.txt target configurations, test suite assertions in GuestLibcInternalIstreambufEqual.cpp, and debt fragment in docs/dev/debt/changes/feat-libcinternal-istreambuf-equal.md. Looks Good To Me
PrivacyOnion commented 2026-11-19 19:38:08 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-19T19:38:08Z.

Review: APPROVED


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

  • Conventions: tools/check_conventions.py passed.
  • Build: guest_libc_internal_istreambuf_equal_tests built cleanly.
  • CTest (guest_libc_internal_istreambuf_equal):
    1/1 Test #4436: guest_libc_internal_istreambuf_equal ...   Passed    0.01 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: with core/libs/prx/libSceLibcInternal/InventoryExports2.cpp, core/libs/prx/libSceLibcInternal/TimeGetFields.cpp, core/libs/prx/libSceLibcInternal/include/InventoryExports2.hpp, core/libs/prx/libSceLibcInternal/include/TimeGetFields.hpp reverted to main, the new tests do not build/link without the change; restoring it makes them build and pass.
  • Code reading:
    • Checked null pointer handling in _ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix and the wchar_t variant: both correctly validate self and right != nullptr and throw std::invalid_argument.
    • Verified Equal and Equal<uint16_t> implementation logic against Microsoft STL and C++ [istreambuf.iterator.ops] specifications, ensuring uninitialized iterators are properly peeked without premature consumption.
    • Verified streambuf get-area fast path and virtual underflow slot (slot 7) fallback, ensuring end-of-stream correctly sets buffer to nullptr and clears cache.
    • Verified NID symbol naming, removal of placeholder stub and alias from InventoryExports2.cpp and InventoryExports2.hpp, and correct declaration in TimeGetFields.hpp.
    • Verified CMakeLists.txt test executable definition, CTest setup, cross-platform WIN32 path configuration, and test coverage in GuestLibcInternalIstreambufEqual.cpp.
    • Verified AGENTS.md conventions and debt tracking fragment docs/dev/debt/changes/feat-libcinternal-istreambuf-equal.md.

Looks Good To Me

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5982016506 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-5982016506). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-19T19:38:08Z. **Review:** APPROVED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `d94b629435`: - **Conventions**: `tools/check_conventions.py` passed. - **Build**: `guest_libc_internal_istreambuf_equal_tests` built cleanly. - **CTest** (`guest_libc_internal_istreambuf_equal`): ``` 1/1 Test #4436: guest_libc_internal_istreambuf_equal ... Passed 0.01 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: with `core/libs/prx/libSceLibcInternal/InventoryExports2.cpp`, `core/libs/prx/libSceLibcInternal/TimeGetFields.cpp`, `core/libs/prx/libSceLibcInternal/include/InventoryExports2.hpp`, `core/libs/prx/libSceLibcInternal/include/TimeGetFields.hpp` reverted to `main`, the new tests do not build/link without the change; restoring it makes them build and pass. - **Code reading**: - Checked null pointer handling in _ZNKSt19istreambuf_iteratorIcSt11char_traitsIcEE5equalERKS2__nid_postfix and the wchar_t variant: both correctly validate self and right != nullptr and throw std::invalid_argument. - Verified Equal<char> and Equal<uint16_t> implementation logic against Microsoft STL and C++ [istreambuf.iterator.ops] specifications, ensuring uninitialized iterators are properly peeked without premature consumption. - Verified streambuf get-area fast path and virtual underflow slot (slot 7) fallback, ensuring end-of-stream correctly sets buffer to nullptr and clears cache. - Verified NID symbol naming, removal of placeholder stub and alias from InventoryExports2.cpp and InventoryExports2.hpp, and correct declaration in TimeGetFields.hpp. - Verified CMakeLists.txt test executable definition, CTest setup, cross-platform WIN32 path configuration, and test coverage in GuestLibcInternalIstreambufEqual.cpp. - Verified AGENTS.md conventions and debt tracking fragment docs/dev/debt/changes/feat-libcinternal-istreambuf-equal.md. Looks Good To Me
MarcZX10 commented 2026-11-19 19:46:54 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-19T19:46:54Z.

Review: APPROVED


Reviewed — looks good

The implementation and registered tests support the stated iterator equality behavior; no blocking defect was found in the reviewed files.

What I ran

  • Head reviewed: d94b629435e84f0cd09e5f944f76ed1e84787064.
  • Read the prepared description, commit summary, diff, and all seven changed files listed in the manifest. No repository commands or tests were run; test results in the description are author-reported.
  • repo_read.py was used to read targeted source ranges; the ruling file was supplied in the prompt and was not read.

Results

Check Result Note
Diff and changed files passed Seven manifest files reviewed
Test execution not run Reported results are author supplied
Repository checks not run Not executed in this review

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build and test outcomes were not independently verified. The prepared files.json was not available through the reader, so excluded-file details were not verified; the manifest lists seven changed files and all were read. No runtime behavior on a physical console was verified.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5982155166 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-5982155166). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-19T19:46:54Z. **Review:** APPROVED --- # Reviewed — looks good The implementation and registered tests support the stated iterator equality behavior; no blocking defect was found in the reviewed files. ## What I ran - Head reviewed: `d94b629435e84f0cd09e5f944f76ed1e84787064`. - Read the prepared description, commit summary, diff, and all seven changed files listed in the manifest. No repository commands or tests were run; test results in the description are author-reported. - `repo_read.py` was used to read targeted source ranges; the ruling file was supplied in the prompt and was not read. ## Results | Check | Result | Note | |---|---|---| | Diff and changed files | passed | Seven manifest files reviewed | | Test execution | not run | Reported results are author supplied | | Repository checks | not run | Not executed in this review | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build and test outcomes were not independently verified. The prepared `files.json` was not available through the reader, so excluded-file details were not verified; the manifest lists seven changed files and all were read. No runtime behavior on a physical console was verified. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-20 07:23:06 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T07:23:06Z.

Review: APPROVED


Reviewed — looks good

The implementation and added tests support merging at head 1f5e30197d7f71ea0785a147ebdaca7ff6c416f2; the author-reported checks were not rerun here.

What I ran

Read the prepared description, commit list, manifest, diff, and all seven changed files at the pinned head. No commands or tests were run.

Results

Check Result Note
Changed code review passed All changed files read
Build and tests not run Results in the description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build and test results were not independently verified. No changed files were excluded from review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5988941096 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-5988941096). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T07:23:06Z. **Review:** APPROVED --- # Reviewed — looks good The implementation and added tests support merging at head `1f5e30197d7f71ea0785a147ebdaca7ff6c416f2`; the author-reported checks were not rerun here. ## What I ran Read the prepared description, commit list, manifest, diff, and all seven changed files at the pinned head. No commands or tests were run. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All changed files read | | Build and tests | not run | Results in the description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build and test results were not independently verified. No changed files were excluded from review. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-20 19:59:11 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-20T19:59:11Z.

Review: APPROVED


Reviewed — looks good

The reviewed changes at head 9c5dbdd66ef6569fe038934f0a38b64404521344 implement both iterator equality exports, and the inspected code and reported checks support merging.

What I ran

Read the prepared diff and all seven changed files listed in the manifest. No commands or tests were run during this review; test results below are author-reported.

Results

Check Result Note
Changed files inspected passed All seven manifest files read
Tests and checkers not run Results reported in the PR description

Findings

Blocking

None.

Non-blocking

None.

Sources

Behavior claims are based on the changed implementation and tests at the reviewed head.

Not verified

I did not run tests, checkers, or a build. I did not independently verify behavior on console hardware. The PR description reports passing iterator and time-get tests and clean checkers on its rebased head; those results were not reproduced here. No files were excluded from review.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5998590367 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-5998590367). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-20T19:59:11Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed changes at head `9c5dbdd66ef6569fe038934f0a38b64404521344` implement both iterator equality exports, and the inspected code and reported checks support merging. ## What I ran Read the prepared diff and all seven changed files listed in the manifest. No commands or tests were run during this review; test results below are author-reported. ## Results | Check | Result | Note | |---|---|---| | Changed files inspected | passed | All seven manifest files read | | Tests and checkers | not run | Results reported in the PR description | ## Findings ### Blocking None. ### Non-blocking None. ## Sources Behavior claims are based on the changed implementation and tests at the reviewed head. ## Not verified I did not run tests, checkers, or a build. I did not independently verify behavior on console hardware. The PR description reports passing iterator and time-get tests and clean checkers on its rebased head; those results were not reproduced here. No files were excluded from review. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-21 00:06:56 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-21T00:06:56Z.

Review: APPROVED


Reviewed — looks good

The reviewed change implements the two iterator equality exports and adds a focused regression test; no blocking defect was verified.

What I ran

Reviewed head 3b30cf23ccb6fa48d395bf003562f6aa48e979f3. No commands or tests were run in this review; repo_read.py was unavailable as a command, so I used the prepared review reader.

Results

Check Result Note
Changed code review passed All seven changed files read
Tests in this review not run Author reports test and checker results in the description

Findings

Blocking

None.

Non-blocking

None.

Not verified

No tests or checkers were run for this review. The author-reported test results were not independently verified. No files were excluded by the manifest; files.json was not available through the reader, so that exclusion list could not be checked.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6001080764 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-6001080764). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-21T00:06:56Z. **Review:** APPROVED --- # Reviewed — looks good The reviewed change implements the two iterator equality exports and adds a focused regression test; no blocking defect was verified. ## What I ran Reviewed head `3b30cf23ccb6fa48d395bf003562f6aa48e979f3`. No commands or tests were run in this review; `repo_read.py` was unavailable as a command, so I used the prepared review reader. ## Results | Check | Result | Note | |---|---|---| | Changed code review | passed | All seven changed files read | | Tests in this review | not run | Author reports test and checker results in the description | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified No tests or checkers were run for this review. The author-reported test results were not independently verified. No files were excluded by the manifest; `files.json` was not available through the reader, so that exclusion list could not be checked. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-25 08:52:22 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T08:52:22Z.

Review: APPROVED


Reviewed — looks good

Nothing in the inspected changes blocks merging; the implementation and its focused test align with the described iterator equality behavior.

What I ran

Read the prepared review artifacts for head b1acaec95b9ea63983b61c81b50fe0bc7b968e4b and inspected the changed implementation, declarations, test, build registration, and debt fragment through repo_read.py. No commands or tests were run in this review.

Results

Check Result Note
Change and implementation review passed Inspected all changed files
Programmatic checks not run Relied on the author's reported checks

Findings

Blocking

None.

Non-blocking

None.

Not verified

Did not run the test suite or independently verify the author's reported test and checker results. No changed files were excluded; all six files listed in manifest.json were read. files.json was not available in the prepared review folder, so exclusions by rule were not independently confirmed.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6054429763 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-6054429763). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T08:52:22Z. **Review:** APPROVED --- # Reviewed — looks good Nothing in the inspected changes blocks merging; the implementation and its focused test align with the described iterator equality behavior. ## What I ran Read the prepared review artifacts for head `b1acaec95b9ea63983b61c81b50fe0bc7b968e4b` and inspected the changed implementation, declarations, test, build registration, and debt fragment through `repo_read.py`. No commands or tests were run in this review. ## Results | Check | Result | Note | |---|---|---| | Change and implementation review | passed | Inspected all changed files | | Programmatic checks | not run | Relied on the author's reported checks | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Did not run the test suite or independently verify the author's reported test and checker results. No changed files were excluded; all six files listed in `manifest.json` were read. `files.json` was not available in the prepared review folder, so exclusions by rule were not independently confirmed. ## To get this to a good state Nothing is required.
MarcZX10 commented 2026-11-25 22:56:59 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-25T22:56:59Z.

Review: APPROVED


Reviewed — looks good

The implementation at head 352c5ae5af688d4edce549570210ad2037ae062b uses the existing iterator peek/equality helpers, exports both character variants, and includes focused coverage; I did not run checks in this review.

What I ran

No commands or checks were run. I read the prepared description, commit list, manifest, diff, and the full text of all six changed files at the pinned head. The description reports successful checks on the head; those results were not run or independently verified here.

Results

Check Result Note
Source review passed Changed implementation and test read
Build and tests not run Results in description are author-reported

Findings

Blocking

None.

Non-blocking

None.

Not verified

Build, test, checker, merge-preview, and console behavior were not verified in this review. The description reports the focused tests and split suite passed on the stated head/configuration; this review did not reproduce those runs. No files were excluded from the review manifest; all six changed files were read.

To get this to a good state

Nothing is required.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6066122939 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-6066122939). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-25T22:56:59Z. **Review:** APPROVED --- # Reviewed — looks good The implementation at head `352c5ae5af688d4edce549570210ad2037ae062b` uses the existing iterator peek/equality helpers, exports both character variants, and includes focused coverage; I did not run checks in this review. ## What I ran No commands or checks were run. I read the prepared description, commit list, manifest, diff, and the full text of all six changed files at the pinned head. The description reports successful checks on the head; those results were not run or independently verified here. ## Results | Check | Result | Note | |---|---|---| | Source review | passed | Changed implementation and test read | | Build and tests | not run | Results in description are author-reported | ## Findings ### Blocking None. ### Non-blocking None. ## Not verified Build, test, checker, merge-preview, and console behavior were not verified in this review. The description reports the focused tests and split suite passed on the stated head/configuration; this review did not reproduce those runs. No files were excluded from the review manifest; all six changed files were read. ## To get this to a good state Nothing is required.
ligmaSec commented 2026-12-03 12:52:02 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by ligmaSec on 2026-12-03T12:52:02Z.

Review: COMMENTED


Built the branch’s changed sources and ran GuestLibcInternalIstreambufEqual on Linux against the existing runtime libraries. The test run passed and covered the istreambuf iterator equality cases.

AI-assisted: yes.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6170166306 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/23809#pullrequestreview-6170166306). Originally posted by [ligmaSec](https://github.com/ligmaSec) on 2026-12-03T12:52:02Z. **Review:** COMMENTED --- Built the branch’s changed sources and ran GuestLibcInternalIstreambufEqual on Linux against the existing runtime libraries. The test run passed and covered the istreambuf iterator equality cases. AI-assisted: yes.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/23809:upstream-pr/23809'
git switch 'upstream-pr/23809'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/23809'
git switch 'upstream-pr/23809'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/23809'
git switch 'upstream-pr/23809'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/23809'
git switch 'main'
git merge --squash 'upstream-pr/23809'
git switch 'main'
git merge --ff-only 'upstream-pr/23809'
git switch 'main'
git merge 'upstream-pr/23809'
git push origin 'main'
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!23809
No description provided.