revert: stop wcstombs before a multibyte character exceeding capacity (#21244) #21567

Merged
oneandonlydean merged 1 commit from upstream-pr/21567 into main 2026-11-16 13:36:03 +00:00
oneandonlydean commented 2026-11-16 12:16:36 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-11-16T12:16:36Z.


What

Exact inverse revert of #21244, reopened from #21515 (whose merge fails on GitHub with HTTP 502 every time) (merge fc66bec8cd). It makes wcstombs stop before a multibyte character that would exceed the capacity, but the existing guest_multibyte_locale test expects the opposite ("wcstombs fills the capacity mid-character", GuestMultibyteLocale.cpp:113), and that test now aborts on Windows main on two machines since #21244 merged (last pass 0694c4cbd6, first failure 0173f20a5f). Which behaviour the console has needs settling first; the change can come back with both tests agreeing.

Tested

The full Windows suite on this PR must show guest_multibyte_locale passing.

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
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5336807834 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21567). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-11-16T12:16:36Z. --- ### What Exact inverse revert of #21244, reopened from #21515 (whose merge fails on GitHub with HTTP 502 every time) (merge fc66bec8cdc). It makes `wcstombs` stop before a multibyte character that would exceed the capacity, but the existing `guest_multibyte_locale` test expects the opposite ("wcstombs fills the capacity mid-character", `GuestMultibyteLocale.cpp:113`), and that test now aborts on Windows `main` on two machines since #21244 merged (last pass 0694c4cbd6, first failure 0173f20a5f). Which behaviour the console has needs settling first; the change can come back with both tests agreeing. ### Tested The full Windows suite on this PR must show `guest_multibyte_locale` passing. ### Checklist - [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
PrivacyOnion commented 2026-11-16 12:18:19 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by PrivacyOnion on 2026-11-16T12:18:19Z.

Review: CHANGES_REQUESTED


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

  • Conventions: tools/check_conventions.py passed; git diff --check clean.
  • Build: guest_wcsrtombs_tests built cleanly.
  • CTest (guest_wcsrtombs):
    1/1 Test #1278: guest_wcsrtombs ..................   Passed    0.00 sec
    100% tests passed, 0 tests failed out of 1
    
  • Negative control: the tests still pass with the change reverted, so they do not cover it

Requesting changes for the points above.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5919827244 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/21567#pullrequestreview-5919827244). Originally posted by [PrivacyOnion](https://github.com/PrivacyOnion) on 2026-11-16T12:18:19Z. **Review:** CHANGES_REQUESTED --- Verified on Linux (Ubuntu 24.04, GCC 13.3, Ninja, Release) against `cc1c20e0dd`: - **Conventions**: `tools/check_conventions.py` passed; `git diff --check` clean. - **Build**: `guest_wcsrtombs_tests` built cleanly. - **CTest** (`guest_wcsrtombs`): ``` 1/1 Test #1278: guest_wcsrtombs .................. Passed 0.00 sec 100% tests passed, 0 tests failed out of 1 ``` - **Negative control**: the tests still pass with the change reverted, so they do not cover it Requesting changes for the points above.
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!21567
No description provided.