Skip to content

test(libc): cover overlapping UTF-16 unit moves - #12890

Open
StoneDC wants to merge 1 commit into
boykopovar:mainfrom
StoneDC:b41/wmemmove-snapshot
Open

StoneDC wants to merge 1 commit into
boykopovar:mainfrom
StoneDC:b41/wmemmove-snapshot

Conversation

@StoneDC

@StoneDC StoneDC commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

What

Adds 105,633 overlapping wmemmove unit-copy cases with full-array snapshot expectations, self/disjoint copies, both overlap directions, zero units and patterns including zero, high units and surrogate code units.

Implementation basis: The canonical Api.hpp declaration uses char16_t; all test storage uses that exact type. An immutable array snapshot computes the answer in units, catching byte-count mistakes. General unit-copy contract: https://github.com/freebsd/freebsd-src/blob/833d39bd2e38421a14ea489a956261a0fa993fbc/lib/libc/string/wmemchr.3 . No host wchar_t substitution or guessed layout is used.

Known limits: This checks movement of raw units, not Unicode decoding, PS5 wchar_t/layout conformance, invalid ranges or size multiplication overflow.

Existing implementation/schema: core/libs/prx/libc/src/Strings.cpp core/libs/prx/libc/include/Api.hpp

Exact topic head e1a91d4fd9b7b41d97c63c8169472b90d5cc5cd1 is one independent commit on main 5454cd2e455994d992aca39335ce60507eeda1eb. The repository overlap checker against 157b02c4f1803e9d2cd757677b9a805961203fc4 reported no confirmed overlap. It could not complete shared-file comparisons for older PRs already conflicting with main: #5021, #6085, #7081, #7447, #7715, #8150, #10324, #10615, #11625, #12271, #12682, #12688, #12700. Scoped file diffs were reviewed separately. 11 file changes projected onto main and then combined with this topic without a new conflict; 2 peer file changes already conflict with main and are not claimed automatically mergeable. They do not provide this feature or test matrix. The new test has its own source and registration, with no required landing order. If shared registration code changes before landing, this branch needs refreshed merge and affected test checks. Depends on: none. The 20 independent topics also merged together into tested integration 81a0f73e5972352ba2b50ce53077921c51112273 on the same main.

Tested

Tested topic head: e1a91d4fd9b7b41d97c63c8169472b90d5cc5cd1. Final combined integration: 81a0f73e5972352ba2b50ce53077921c51112273, main 5454cd2e455994d992aca39335ce60507eeda1eb. Ubuntu/WSL GCC 15.2, CMake 4.2.3, Python 3.14.4; Windows MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3.

Built and ran registered guest_wmemmove_snapshot against the actual unpatched libc on Linux and Windows, no skips. A separate control compiled the whole relevant production source unit and this fixture: the unchanged source passed and an intentional production-function defect was caught. Those source-unit and fixture bytes are unchanged after the main refresh; current-head CMake runtime was rechecked separately. This control is not described as a full product build.

cmake --build <full-linux-build> --parallel 8: full Linux default product build passed, including a final build at the integration above. Windows used the full configuration and built the affected libc/test targets and relinker with --parallel 8; a complete default Windows build is not claimed. ctest --test-dir <build> -R "^(tools_sanitizer_json|tools_annotation_symbols_json|tools_compile_plan|tools_catalog_json|tools_nid_offline|tools_audit_strict_partial|tools_intervals_complete|tools_pad_preview|tools_release_notes_check|tools_progress_diff_json|guest_memmove_snapshot|guest_memcpy_protected|guest_memcmp_protected|guest_span_protected|guest_substring_protected|guest_tokenizer_protected|guest_strncpy_protected|guest_strncat_protected|guest_wmemmove_snapshot|guest_wide_length_protected)$" -j 8 -V --output-on-failure: 20/20 passed on each platform, zero skips. Conventions, whitespace, script registration and the public-header audit passed. No PS5/title execution or GPU validation protocol was run; macOS and hosted full-build CI are not reported as passed.

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

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/prx/libc/CMakeLists.txt
PR 6819 core/libs/prx/libc/CMakeLists.txt
PR 7081 core/libs/prx/libc/CMakeLists.txt
PR 7447 core/libs/prx/libc/CMakeLists.txt
PR 7715 core/libs/prx/libc/CMakeLists.txt
PR 7851 core/libs/prx/libc/CMakeLists.txt
PR 8150 core/libs/prx/libc/CMakeLists.txt
PR 8965 core/libs/prx/libc/CMakeLists.txt
PR 12682 core/libs/prx/libc/CMakeLists.txt
PR 12688 core/libs/prx/libc/CMakeLists.txt
PR 12700 core/libs/prx/libc/CMakeLists.txt
PR 12849 core/libs/prx/libc/CMakeLists.txt
PR 12965 core/libs/prx/libc/CMakeLists.txt
PR 13449 core/libs/prx/libc/CMakeLists.txt
PR 13486 core/libs/prx/libc/CMakeLists.txt
PR 13809 core/libs/prx/libc/CMakeLists.txt
PR 15899 core/libs/prx/libc/CMakeLists.txt

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants