feat(libc): implement overlap-safe bcopy #2059
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2059"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by QRMOE on 2026-10-09T06:17:19Z.
What
Adds
bcopy(RMo7j0iTPfA) with its source-first argument order and overlap-safememmovebehavior. Zero-length calls do not access either pointer. Reference: FreeBSD bcopy.Tested
guest_bcopypasses: every valid source offset, destination offset and length in a 64-byte region is checked against an unchanged-source snapshot, including identical ranges, both overlap directions, adjacent and disjoint ranges, and whole-buffer guards. Also covers separate buffers, binary data, null pointers for zero bytes, and errno preservation.Windows 11, WinLibs MinGW-w64 GCC 15.2.0 r7 UCRT/posix/SEH, Ninja Release,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=ON; basef145139676a48306681d3a4d5fabf83938759daf.Combined validation of these three independent branches: full
libstarget built successfully, including NID patching;guest_memmem,guest_bcopy, both line-input tests,guest_standard_streams, andguest_errorspass (6/6). All four NIDs are present in patchedlibc.prx. Conventions, diff whitespace and test registration checks pass. The branches were also built and tested individually before integration.Before publication, actual library diffs of 559 candidate PR heads were checked for these names and NIDs, including broad PRs and newer heads; no other implementation of these four exports was found. The candidates cover the cached open-PR list and every newer PR head; some candidates may have closed since that list was read.
Linux, console behavior, games and the complete CTest suite have not been run. This adds documented libc interfaces; no particular title starting successfully is claimed.
Checklist
main; no other open PR implements the same functionsImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-09T08:57:41Z.
Same as #2058, for
bcopy.Pull request closed