Skip to content

fix(libc): sort with FreeBSD 11.4's merge.c in mergesort - #12271

Open
B-Howell wants to merge 10 commits into
boykopovar:mainfrom
B-Howell:fix/libc-mergesort-freebsd-merge
Open

B-Howell wants to merge 10 commits into
boykopovar:mainfrom
B-Howell:fix/libc-mergesort-freebsd-merge

Conversation

@B-Howell

@B-Howell B-Howell commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

What

mergesort (libSceLibcInternal, implemented in libc) now sorts with FreeBSD 11.4's merge.c. Before this, it was a plain bottom-up merge, so it called the comparator in a different order and a different number of times than the FreeBSD/libbsd reference.

The existing debt entry records argument checks from libSceLibcInternal.sprx (SDK 4.5x build of J03950001, 0x762D0) that match merge.c's checks:

  • an element size under PSIZE / 2 (4) sets EINVAL and returns -1;
  • an empty array returns 0;
  • the scratch block is count * size + PSIZE bytes.

Those argument checks motivate using the FreeBSD reference; they do not establish the console algorithm or its comparator-call sequence. Comparator ordering here is verified against FreeBSD/libbsd and remains unmeasured on a console.

What the implementation does, all from merge.c:

  • The first pass is merge.c's setup, natural and pairwise. The last 4 or 5 elements (all of them when there are 5 or fewer) go through its insertion sort. A run of THRESHOLD (16) same-sense pairs becomes a natural run, and a descending one is reversed in place.
  • The run list lives inside the two buffers, at the pointer-aligned position of each run's start (EVAL). The buffers swap roles each pass.
  • Each merge searches linearly and switches to exponential search after six linear wins, then binary. It keeps the big state across merges and passes, as merge.c does.
  • The final copy back into base, the frees and the return values are merge.c's.

It moves out of FileAndHeap.cpp into libc/src/Mergesort.cpp. A null base or comparator, and a size product that overflows, still throw: the console does not check them. The debt entry is cut to those cases.

Tested

Frozen f776 refresh pair - Windows: the ordinary merge candidate 25d9d7b9f71ec609d98d7e766029336b2fb5de19 (tree f4a5a7733bae8777f2657025dbc9aed3921ef72a) passed the existing guest_qsort CTest once (1/1) after the matching frozen-main f776fddcffd1cfece220ecdd894371988b164f6a control also passed once (1/1). Both arms used Windows native Release/Ninja, WinLibs GCC 15.2.0 r7, BUILD_TESTING=ON, at most two build jobs, and the same ImageOneDimensionalArray CMake selection; each built guest_qsort_tests and libc before running CTest ^guest_qsort$. Conventions passed against origin/main with 0 errors and two pre-existing debt-length warnings. This is a focused Windows libc test pair only; it does not claim Linux, GPU, console, full-suite, or hosted-CI results. Historical results below remain pinned to their stated commits and were not retargeted.

Frozen-main refresh qualification: 3483366e8300fd3c06c711026e7f7c15ae76e6a9 on main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4.

Windows/MSYS2 UCRT64 GCC 16.2.0 Rev6 and Linux/WSL GCC 11.4, Release, separate new build directories, at most two jobs, serial arms/platforms. The isolated PR candidate passed the existing guest_qsort CTest once on each OS. All four frozen arms passed:

Arm Commit Windows Linux
Main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4 1 pass 1 pass
Heapsort fixture PR 66b4ecb13df784ba4a49c777d054bed39c260650 1 pass 1 pass
Mergesort PR 3483366e8300fd3c06c711026e7f7c15ae76e6a9 1 pass 1 pass
Private combined check 9741133de15e810cc06b4cc69fec378bdd053b04 1 pass 1 pass

Eight native executions total, zero failures/skips; one registered test per arm, 20-second test timeout. Source groups differ as the PRs add their regressions. Every arm built production libc and its own fixture; Windows PE/CTest search paths and Linux ldd resolve the corresponding module. Recorded conventions checks passed on all eight arms. Independent source and result reviews passed.

The Mergesort implementation blob and FreeBSD notice remain identical to the previously qualified topic; main qsort_r ordering and validation coverage is retained. The private combined check preserves both helper groups and calls; its result is separate from either public PR and does not establish landing order. Historical algorithm, corpus, negative-control and hosted results below retain their original pins and were not repeated by this refresh. Dependency agreements, current-tip follow-through, human/hosted-CI review, remaining overlap obligations and verified main landing remain open.

Earlier verification — original pins retained:

Latest integration verification: 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff, preserving published history and integrating main snapshot 4c8cff191609bc5f28bf9ee2f93672b531285aa4.

  • The committed source tree f215ab2e48acec003def2a008340fa54d041bec6 exactly matches the isolated comparison that was rebuilt and tested on Windows with MSYS2 UCRT64 GCC 16.2.0, Ninja Release, BUILD_TESTING=ON.
  • cmake --build build-compare --target guest_qsort_tests --parallel 2 succeeds; ctest --test-dir build-compare -R '^guest_qsort$' --repeat until-fail:3 -V passes all three executions, with no skips. CTest uses the rebuilt unpatched libc.prx. The five-file PR implementation/test diff is preserved; current-main environment and other debt entries are retained, with only the mergesort entry replaced.
  • Conventions pass against the fetched main. Independent review verifies the integration tree and source/log/binary evidence.
  • The build uses CMAKE_SKIP_INSTALL_RULES=ON because the normal configuration encounters an nghttp2 installation/export-set dependency error. Installation/export generation is unverified. No fresh Linux/macOS, title, GPU or performance result is claimed.
  • fix(libc): keep guest environment strings alive across setenv and uns… #12054 is now merged and its merge commit is verified reachable from the pinned main. feat(libc): implement lfind and lsearch #11621 and test(libc): cover heapsort record preservation and comparator calls #11833 remain open prerequisites; this update does not clear their order, new-head CI, human re-review or upstream landing requirements.

Earlier verification retained below:

Earlier integration commit fa5b07684d1be2a632b7e60fed67744dc1080bf2 (verified tree 478ba5f7e2c2c45375f627a8e08b8d29d3d42dff), merging frozen main 319621ba2e578bd053b0baba2877fe70520e0737 without rewriting the published history:

  • Windows 11, MSYS2 UCRT64 GCC 16.2.0, Release: cmake --build build-focused --target guest_qsort_tests --parallel 2 passed; ctest --test-dir build-focused -R '^guest_qsort$' --repeat until-fail:3 -V passed all three executions (test491: 0.03/0.01/0.01sec).
  • The five-file contribution and the complete Mergesort.cpp blob are unchanged from the published source. The original 1680-byte FreeBSD notice is preserved byte-for-byte. Independent source/preservation review and conventions passed.
  • This fresh native run does not rerun the reference corpus, historical controls, Linux or console tests. Comparator ordering remains verified against the FreeBSD/libbsd reference rather than measured on a console. The fix(libc): keep guest environment strings alive across setenv and uns… #12054 author-order proposal remains unconfirmed; that branch is not combined here.

Earlier published-source reference and native evidence follows:

  • Reference: libbsd 0.11.5 ships a copy of FreeBSD's merge.c. In WSL Ubuntu 22.04, I loaded its mergesort with dlopen and compared it with this implementation, compiled with ASan and UBSan.
    • The inputs were 7,224 arrays: sizes 8, 9, 12 and 16 bytes, 0 to 300 elements, random, sorted, reversed, few-key and blocked inputs, some on a base 3 bytes off alignment.
    • The comparator call sequences, return values and sorted bytes were identical in every case.
  • New test guest_qsort, CheckMergesortComparisons: it compares the comparator call sequence against libbsd's for four inputs:
    • 5 elements: insertion sort only;
    • 21 elements: pairwise setup;
    • 26 elements: a natural run, then exponential search;
    • 34 elements: interleaved blocks.
  • New test CheckMergesortUnalignedElements: 1,000 12-byte elements on a base 4 bytes off alignment.
  • Linux (WSL Ubuntu 22.04, GCC 11.4, Release): guest_qsort passes 3 of 3 runs.
  • Windows 11 (WinLibs GCC 15.2.0 r7, Release, libs built): guest_qsort passes 3 of 3 runs.
  • Control: main's FileAndHeap.cpp and CMakeLists.txt restored, new tests kept. guest_qsort fails on both OSes: the four inputs make 9, 78, 73 and 107 comparisons, where merge.c makes 6, 84, 42 and 60, in a different order.
  • Not tested: a console. The order of comparator calls is checked against libbsd's merge.c, not measured on a PS5.
  • python tools/check_conventions.py --base origin/main passes.

Checklist

🤖 Generated with Claude Code

CI configuration prerequisite — 2026-10-30

CI-only integration 4980f2197d7db42783f599b5776b25105ad48405 (tree c1d2e4c2f70bb8b867a0d505deed4bebd1c206b8) retains original #13220 commit e9f09f54fabb6408d3e2711b8df10c10112ab00e as its second merge parent, after 3483366e8300fd3c06c711026e7f7c15ae76e6a9. Whole-tree and source-pin verification confirms only core/libs/tests/write_watch/CMakeLists.txt changes: five lines deleting the repeated execute-fault/read-fault registration. No libc implementation or fixture source changes.

Configuration-only comparison used the exact exported four-file graphs: the old graphs match across #11831/#12271, the fixed graphs match across both integrations, and all three companion C++ files are unchanged. Two shared arms per OS were configured serially: Windows CMake 4.4.4 / WinLibs GCC 15.2.0 r7 / Ninja 1.13.2 and WSL CMake 3.22.1 / GCC 11.4 / Ninja 1.10.1. Both old arms failed on both duplicate names after genuine native compiler/Threads probes; both fixed arms configured/generated successfully. Each fixed generated inventory contains exactly 18 unique name/executable/mode mappings with 30-second timeouts. These are four configure checks (two expected RED, two GREEN), not 18 runtime passes. No fixture build or CTest execution occurred.

The isolated two native sort passes remain pinned to 3483366e8300fd3c06c711026e7f7c15ae76e6a9; the earlier four-arm/eight-execution group retains all four original pins on frozen 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4. Those executions were not repeated or retargeted. Existing #11621/#11833 dependencies, landing order, current-tip follow-through, human/bot review and verified main landing remain open.

New-head hosted CI qualification remains pending after publication. No macOS tests were run locally; the earlier hosted failure and all historical results retain their original heads. This configuration result does not establish platform/runtime, whole-product or dependency-order clearance.

The console's libSceLibcInternal mergesort checks its arguments as
FreeBSD's merge.c does (size under 4 is EINVAL, a scratch block of count
times size plus 8 bytes), but the guest export was a plain bottom-up
merge, so it called the comparator in a different order and number of
times. It now runs merge.c's natural/pairwise setup with insertion sort
of the last four or five elements, the linked runs kept inside both
buffers, and the switch to exponential search after six linear wins.
guest_qsort checks the comparator call sequence for four inputs against
libbsd's copy of merge.c, and 12-byte elements on an unaligned base.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 28, 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
docs/dev/debt/libc.md
PR 6085 core/libs/prx/libc/CMakeLists.txt
PR 6565 docs/dev/debt/libc.md
PR 7081 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 7386 docs/dev/debt/libc.md
PR 7447 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 7715 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 8150 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 8965 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 9340 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9526 core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 9863 docs/dev/debt/libc.md
PR 9929 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 10113 docs/dev/debt/libc.md
PR 10324 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 10349 docs/dev/debt/libc.md
PR 10405 core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 10729 docs/dev/debt/libc.md
PR 10953 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 10989 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11262 docs/dev/debt/libc.md
PR 11266 docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md
PR 11624 core/libs/prx/libc/CMakeLists.txt
PR 11625 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 11628 core/libs/prx/libc/CMakeLists.txt
PR 11661 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 11689 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 11698 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 11724 docs/dev/debt/libc.md
PR 11726 docs/dev/debt/libc.md
PR 12468 docs/dev/debt/libc.md
PR 12560 core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 12586 docs/dev/debt/libc.md
PR 12682 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 12688 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 12700 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 12920 docs/dev/debt/libc.md
PR 12965 core/libs/prx/libc/CMakeLists.txt
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 13793 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 13809 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md
PR 14235 core/libs/prx/libc/CMakeLists.txt
docs/dev/debt/libc.md

@fogydes

fogydes commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

verdict: OK

  1. [read-only] I found no concrete defect in the mergesort port or its tests. The implementation and comparison tests follow the described FreeBSD merge.c behavior, including stable ties, run setup, galloping, and unaligned records.
  2. [author-reported] Linux/Windows guest_qsort and the ASan/UBSan comparison pass per the body; console behavior is explicitly unverified, and I did not rerun the tests.
  3. [verified] tools/check_conventions.py --base 0cd07dc and git diff --check pass.

Freshness envelope: head c84e076; merge-base 0cd07dc; behind main: 0; git merge-tree --write-tree origin/main pull/12271: exit 0, clean.

Cross-PR ledger: open non-draft PR #11621 conflicts with this head in FileAndHeap.cpp; #11833 conflicts in GuestQsort.cpp; #12054 conflicts in docs/dev/debt/libc.md. Pairwise git merge-tree exits 1 for each, so those heads need conflict resolution if combined.

@B-Howell

B-Howell commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Correction to the ownership statement: #11621 and #11833 are mine; #12054 belongs to @Aspct3434. I can set the order of my own contributions, not that contributor's work.

#11621 and #11833 remain the declared predecessors for this PR, and I will refresh/retest the combined branch after they land. The reported shared-file conflict with #12054 is in docs/dev/debt/libc.md; an agreed landing order with its author has not been established here. I am not claiming that agreement.

AI-assisted: Claude Code; ownership/coordination clarification by Codex.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The algorithm is explicitly adapted from FreeBSD 11.4 merge.c, and the new implementation closely follows that file, but core/libs/prx/libc/src/Mergesort.cpp has no source attribution/license notice. FreeBSD’s source license requires source redistributions to retain its copyright notice, conditions and disclaimer. Please add the applicable notice (including the Regents of the University of California / Peter McIlroy attribution) to the new source file, or document the permitted provenance if this is an independent clean-room implementation. I checked the exact 11.4 source header; this is the only blocking finding from this pass. The algorithm comparison and reported Linux/Windows tests are otherwise detailed, and current hosted build, relinker, sanitizer, conventions and registration checks pass.

…gesort

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@B-Howell

Copy link
Copy Markdown
Contributor Author

Added in 6c42e74. Mergesort.cpp now starts with FreeBSD 11.4 merge.c's notice: the copyright line for the Regents of the University of California, the Peter McIlroy attribution, all three conditions and the disclaimer, word for word. They're written as line comments under an SPDX BSD-3-Clause identifier, matching the existing SPDX headers in libSceFont/libSceAvPlayer, plus a source link in the same form as the Adapted from FreeBSD release/11.4.0 … notes in Math.cpp. Only comments changed; check_conventions.py --base origin/main passes.

AI-assisted (Claude Code).

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@B-Howell one more thing on this port, now that the maintainers have decided it for all borrowed code: please put FreeBSD's original copyright notice and licence text from lib/libc/stdlib/merge.c (the 11.4 revision you ported) at the top of Mergesort.cpp, verbatim. The project's "no comments in code" rule doesn't apply to licence notices. Everything else in the port looked right in review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@B-Howell

Copy link
Copy Markdown
Contributor Author

@oneandonlydean Done in e80f703. The top of Mergesort.cpp is now the /*- … */ notice from 11.4 merge.c, lines 1–31, identical byte for byte to upstream (checked with diff). Above it are the SPDX BSD-3-Clause lines and the source link. Only comments changed, and check_conventions.py passes.

AI-assisted (Claude Code).

@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@B-Howell

B-Howell commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor Author

Manual follow-up to the skipped comparisons in the overlap report (comment6462559173). Reviewed target head: e80f7038fdaa6809ad361cb309ded3265d855d32.

I inspected the listed shared-file patches for all 28 candidates. No duplicate target export/implementation was found in this scoped review. The table records the specific shared-file changes and integration requirements; shared debt/header changes still need to preserve both sides. This is not a claim that every pair merges cleanly or that a combined branch has been built/tested.

This follow-up addresses the skipped-comparison request only. Existing CI limitations, dependency ordering and outstanding re-review requirements remain in force; approvals or tests from older heads do not become current-head evidence through this audit.

Delta review: added #10002 (9bbf84ead3b761fba399c40788bb783b98934e64) and #12397 (f2548977ea559a13c157c8ad0e5109983745dccd) at the unchanged target head above. Both new pairs share only docs/dev/debt/libc.md; the new rows below describe those exact debt patches. Earlier rows retain their recorded candidate heads. This supplement does not re-review their newer heads, establish a landing agreement or claim a clean merge/combined build/test.

Candidate heads, shared files and manual dispositions
Candidate Reviewed head Shared files Disposition
#5021 151294f979ab00aaff2f702314425caf61a72790 CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for src/StringLength.cpp, tests/ExceptionRuntime.cpp, exception_runtime with if(ANYPS5_NATIVE_GRAPHICS), return(). Debt-only statements in libc.md concern ARM64 native aggregate builds reuse the integer, binary32/binary64 and UTF-16 string implementations. The x87 strtold/. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#6085 ffea0b7c1d088005e99ee30256c4decf2834d34d CMakeLists.txt CMakeLists.txt changes source/test registration for tests/GuestDsign.cpp, guest_dsign with if(WIN32). No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#6713 668d51adbdb91248f49fdd28acbfd0b85adb98cd CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for application_heap_without_parameters. Debt-only statements in libc.md concern Application heap without process parameters. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#7081 e6f5d4c71b6ff42a43ee1c90b9b3fc912efdad7b CMakeLists.txt, FileAndHeap.cpp, libc.md CMakeLists.txt changes source/test registration for src/SonyCrt.cpp. FileAndHeap.cpp changes fopen_s constraint-handler calls. Debt-only statements in libc.md concern localeconv; set_constraint_handler_s. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#7386 bf7352321cf85d1bfdfe402f3fba7b2d90c683eb libc.md Debt-only statements in libc.md concern The scanf family. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#7447 dead12ebad24a3c4b01a05c14ab60cc06aacaf7d CMakeLists.txt, FileAndHeap.cpp, libc.md CMakeLists.txt changes source/test registration for src/AppArchiveStream.cpp, tests/GuestArchiveStdio.cpp, guest_archive_stdio_${mode} with if(WIN32). FileAndHeap.cpp adds CloseOwnedStream and archive-aware fopen handling. Debt-only statements in libc.md concern app0.zar. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#7648 bdf0d319632cb330c4ca909fe9d76577d6e58ae9 libc.md Debt-only statements in libc.md concern std::_Throw_C_error. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#7715 783fa9b83f5f0ac617d4b0f05321a34c1279cb7f CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for tests/AsobiRootEnvironment.cpp, asobi_root_environment with if(WIN32). Debt-only statements in libc.md concern getenv, setenv, unsetenv, putenv. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#8150 6a9b1285c596904698bb0511c14f7c04302b708b CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for file_streams_random_character_input. Debt-only statements in libc.md concern fopen of /dev/random and /dev/urandom. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#8937 27aeb1feb4a533bb0d8ca20b9450ea4c0cc45efc CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for tests/GuestSetEnv.cpp, guest_set_env, guest_set_env_pending_${bit} with if(WIN32), if(WIN32). Debt-only statements in libc.md concern fesetenv. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#9371 9ea4c6561be22466166fb26fa61cd2eb0d23f2cf libc.md Debt-only statements in libc.md concern Windows link before ... These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#9447 2dc7b701a4d72515be281c8e469fb14c5a588d63 libc.md Debt-only statements in libc.md concern std::__sce_v2::_Thrd_hardware_concurrency, _Cnd_timedwait, chrono::steady_clock::now_v1_compat. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#9526 1da5b7cd5c8904a515d275f1677f7fbaedf8fe34 FileAndHeap.cpp, libc.md FileAndHeap.cpp adds the distinct versioned _Fiopen mode-table wrapper. Debt-only statements in libc.md concern std::__sce_v2::setw; std::__sce_v2::_Fiopen; std::__sce_v2::_Xregex_error. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both distinct changes during integration; this audit does not establish clean merges or combined test success.
#9775 48b936e3945a1f9a3f1d953e3ad7a9cfd8d1b877 CMakeLists.txt CMakeLists.txt changes source/test registration for tests/GuestUnwindAccessors.cpp, guest_unwind_accessors with if(WIN32). No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#9929 57c6df1f5620c34835e450490fbc574c854e74d1 CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for tests/GuestSyslog.cpp, guest_syslog_reload. Debt-only statements in libc.md concern syslog. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#10253 5b96a875888056c5bd758270593be17d1a3f5542 libc.md Debt-only statements in libc.md concern asin and acos. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#10324 5e32fdc2a5ccd4050a6a2e7f46f94e31966f8cca CMakeLists.txt, FileAndHeap.cpp, libc.md CMakeLists.txt changes source/test registration for tests/GuestFwide.cpp, guest_fwide with if(WIN32). FileAndHeap.cpp adds byte orientation to fread/fwrite/fputs. Debt-only statements in libc.md concern fwide. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#10433 1e32d23a9c221fffeca70ba8a7f709b0057dbd77 FileAndHeap.cpp, libc.md FileAndHeap.cpp factors directory handle opening and supports directory freopen. Debt-only statements in libc.md concern fopen and freopen. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both distinct changes during integration; this audit does not establish clean merges or combined test success.
#10620 2a999da21f5650bfb9aacf88c0d0194d3c5d66ad FileAndHeap.cpp, libc.md FileAndHeap.cpp factors random-device path/null-device handling and adds random-device freopen. Debt-only statements in libc.md concern fopen and freopen of /dev/random and /dev/urandom. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both distinct changes during integration; this audit does not establish clean merges or combined test success.
#11332 793a55ba18497e36f1038242dae9d7e707641f35 libc.md Debt-only statements in libc.md concern snprintf and vsnprintf. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#11625 e97bbf045122e4326b0f5332a9844df37bd1d5dc CMakeLists.txt, libc.md CMakeLists.txt changes source/test registration for src/AppArchiveBacking.cpp. Debt-only statements in libc.md concern app0.zar. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#11849 cd97f141d91cbd1e47f670a3d4eec4c1cfeed609 libc.md Debt-only statements in libc.md concern asinl. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#11850 663230eaafcdc8da7e52b6067e287261c335bb9b libc.md Debt-only statements in libc.md concern reallocalign. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#11870 3670a1509408a983806f09933d5be619263bb44b libc.md Debt-only statements in libc.md concern malloc_stats_fast. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve both debt changes; no implementation integration inferred from debt-only scope.
#11872 21d5a977f993346c5f762d31eebfb15ce349f76f CMakeLists.txt, FileAndHeap.cpp, libc.md CMakeLists.txt changes source/test registration for src/DescriptorAccess.cpp. FileAndHeap.cpp adds descriptor admission and closing callbacks. Debt-only statements in libc.md concern setjmp, longjmp. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#11969 560f498196e7db59ef8b4f41463105dadb96e15a CMakeLists.txt, FileAndHeap.cpp, libc.md CMakeLists.txt changes source/test registration for src/DescriptorAccess.cpp. FileAndHeap.cpp adds descriptor admission and closing callbacks. Debt-only statements in libc.md concern setjmp, longjmp. These are documentation claims, not independently reviewed candidate implementations. No scoped mergesort replacement/source-registration or debt duplicate identified. Preserve Mergesort.cpp and all candidate source/test registrations, including platform guards; run integrated guest sort tests. No author landing agreement established.
#10002 9bbf84ead3b761fba399c40788bb783b98934e64 libc.md Debt-only addition for asinhf/FreeBSD msun range reduction and title-libc survey differences; system-library and FMA results remain unverified. Separate from the mergesort entry. Preserve both debt edits and their measurement limits. No candidate implementation review, author-order agreement or combined test is established.
#12397 f2548977ea559a13c157c8ad0e5109983745dccd libc.md Debt-only changes to the narrow printf family and conversions entries plus a new printf length-modifiers entry. Separate from the mergesort entry; retain the existing Mergesort.cpp license/registration and review obligations. Preserve all entries. No combined merge/build/test claim.

AI-assisted: yes (Codex).

Current skipped-scope supplement at published target fa5b07684d1be2a632b7e60fed67744dc1080bf2: I reviewed the two newly listed pairs below at their exact candidate heads. Both share only docs/dev/debt/libc.md with this PR.

Candidate Reviewed head Debt-only disposition
#11270 2eb8d8d12ff470331b8fed5da1126215ec935214 Replaces the _LLog entry with bundled Dinkumware/x87-precision behavior and reported native-binary comparisons; other SDK versions remain unverified. This is a different entry from mergesort. Preserve both debt edits and their attribution/measurement limits.
#11892 6219aaaff1520be4d484d6b618c3c3977024be58 Updates the strtod entry with reported 11-title Windows decimal wcstod measurements. This exact candidate paragraph still calls hexadecimal behavior unverified, which is stale relative to landed #12291. Compose its decimal qualification with main's PPSA08329-only hexadecimal measurements (Linux host, not console) and glibc 2.35 rounding limit, retaining console wcstod as unmeasured, as already requested in follow-up6477385105. Separate from mergesort; preserve both debt entries.

This is a review of the actual shared debt patches, not independent reproduction of those measurements or a review of either candidate's implementation. No clean combined merge/build/test or author-order agreement is established. The original 26 rows, the earlier #10002/#12397 supplement and their historical pins remain unchanged; #11850/#11870 remain recorded historically although absent from the current skipped list.

The bot still lists #12054 as the sole compared pair. Its displayed debt locus moved from L153-154 to L154-155 after base movement; that offset-only report delta adds no pair and resolves no coordination obligation. Mergesort.cpp is byte-unchanged from the earlier reviewed target e80f7038fdaa6809ad361cb309ded3265d855d32 to the published target above. Existing license/registration, CI, dependency, author-order and re-review qualifications remain in force.

Manual-source follow-up for current #12271 head 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff and the refreshed skipped-comparison table in comment 6462559173. The existing manual table in comment 6475424106 is pinned to e80f7038fdaa6809ad361cb309ded3265d855d32; it does not list these current #9688/#12598 shared-file candidates. This addendum covers only these two candidates and their three listed shared files.

  • fix(libc): sort like the console's qsort and qsort_s #9688 at 1c8ac1874c0ed5ccafef5112d59da6739d4a2fb6: complete shared patches are FileAndHeap.cpp +126/-83 (3 hunks), GuestQsort.cpp +98/-6 (4 hunks), and libc.md +2/-2 (2 hunks). The source replaces the shared qsort/heapsort sorting helpers and changes qsort/qsort_s behavior; its test patch adds comparator-order hash checks and edge cases, and updates qsort/qsort_s ordering expectations.
  • fix(libc): check qsort_s arguments as titles' libc.prx does #12598 at c6cfa7cfd9dbff57752dab24b5574af9d8037822: complete shared patches are FileAndHeap.cpp +129/-91 (2 hunks), GuestQsort.cpp +118/-12 (6 hunks), and libc.md +2/-2 (2 hunks). It carries the qsort tests plus qsort_s constraint-handler and SIZE_MAX>>3 boundary coverage.

At #12271 head 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff, the corresponding patches are GuestQsort.cpp +75/-0 (2 hunks), FileAndHeap.cpp +0/-34 (1 hunk), libc CMake +1/-0 (1 hunk), and libc.md +1/-1 (1 hunk). The test addition records FreeBSD mergesort comparator sequences, checks unaligned records, and calls those tests from main. The FileAndHeap edit removes the former mergesort body; the new source registration puts it in Mergesort.cpp. The #9688/#12598 FileAndHeap hunks concern the qsort sorting helpers and qsort/qsort_s wrappers, while their debt hunks update qsort/qsort_s descriptions; #12271’s debt hunk is the mergesort entry.

For these pinned patches, preserve the qsort/qsort_s implementations and tests together with #12271’s separate Mergesort.cpp registration, comparator tests/calls, and debt entry. This is a source-scope comparison only: it does not claim a clean pairwise merge, combined build/test, or clearance of other rows in the bot table. It does not set a dependency order or author agreement. The latest #12271 human approval remains pinned to its exact current head; CI and declared prerequisite status are reported separately.

October 30 — two additional libc debt scopes

Frozen target #12271: 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff. Captured bot6462559173 at 2026-10-30T01:34:08Z has 37 rows, versus the earlier 35-row mapping. This append reviews only the two new shared docs/dev/debt/libc.md paths; earlier reviewed rows, source pins and runtime evidence keep their original scope. Both candidate PRs also change code outside this shared-document scope; those implementations were not reviewed here.

#12605 updates eight existing signed/unsigned min/max vector-helper debt bullets to name std::invalid_argument versus the documented firmware13.00 invalid-range faults; nonempty bundled-libc/host evidence remains distinct. #12659 adds one scaled-floating NaN debt bullet retaining non-C-locale, other-SDK and console-execution unknowns. These are the notes’ recorded provenance, not new measurements from this review. The same two immutable candidate patches are reused for the two targets, with separate target-specific preservation dispositions.

Candidate / frozen head Complete shared debt patch Target-specific preservation
#12605 45a7c8a8a22fb822e8830d3df77a864cfb356cd5 +8/-8, 1 complete hunk Keep the eight revised vector-helper invalid-range notes without transferring their firmware13.00 fault behavior to mergesort. Preserve #12271’s replacement mergesort entry pointing to Mergesort.cpp and FreeBSD11.4 merge.c, the null/comparator/overflow throw gap, size<4 EINVAL/-1 and allocation-failure contract, and comparator-call order checked against libbsd rather than console. The candidate document still has the old FileAndHeap.cpp bottom-up-sort paragraph; do not restore it when retaining the unrelated helper edits.
#12659 0fd2f5aff1845b2cb570d4f50f124ab8d75513ae +1/-0, 1 complete hunk Keep the new scaled-floating NaN limits and host-run reference provenance in the floating-point section. Preserve #12271’s Mergesort.cpp/FreeBSD argument/error and libbsd-comparator-order qualification exactly. The candidate document still describes the old FileAndHeap.cpp bottom-up sort, so compose the new NaN bullet with our replacement sort paragraph rather than replacing the file or broadening console/comparator claims.

These are fresh pinned debt-composition notes only. They establish no same-export, implementation/dependency, author-order, composed runtime or console-verification conclusion; the shared path alone settles none of those. No new source edit, build, test, cache/ref change or public write was performed. This does not refresh every retained row or clear the whole current table; existing readiness/integration gates and old test pins remain unchanged.

AI-assisted: yes (Codex).

October 30 - pinned #12659 debt follow-up

At 58fddd82c67ac084cb2d8ca6a3aff862910e7daf, #12659 retains the same sole added libc.md paragraph reviewed at 0fd2f5aff1845b2cb570d4f50f124ab8d75513ae: scaled-floating NaN evidence comes from two title-bundled libraries run on Linux; non-C locales, other SDK variants and console execution remain unverified. Complete shared scope is still +1/-0 in one hunk. The raw patch differs in its hunk offset (131 to 134) and inherited _LLog context, rather than being byte-identical. This is a current scoped-document preservation check, not equivalence of the foreign implementation.

Our target remains 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff and its debt contract is unchanged. Preserve mergesort's argument/allocation error rules, FreeBSD11.4 provenance and the distinction between libbsd comparator-order checks and console measurements. Existing test pins remain unchanged; no new build/runtime, export, dependency, merge-order, consent or whole-table clearance is claimed.

AI-assisted: yes (Codex).


Source-preservation follow-through for #12271 at 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff (owned source SHA256 13d6d1e46402b13763711b5a6b387ec9d5d3a78290504f3f7714cb55a72ee6f0). This is an append draft for independent review, not a posted or combined-tested result.

  • fix(libc): use the Annex K size limit and codes of the PS5 libc, as measured on a PS5 #8965 65c7c4abe424979778bae6f529d2afee8a03086f, core/libs/prx/libc/CMakeLists.txt (patch SHA256 7b4b9f3fdf8e4e708a5d671d4bb89a3855dcefadec13b0c303e7934cb299030e): Adds guest_libc_annexk_rsizemax executable/test with LIBS_INCLUDE_DIR, libc link, unwind configuration, timeout20 and WIN32 libc PATH prepend. Retain the complete new registration alongside the untouched guest_qsort block, including both timeout and Windows PATH modification. Do not replace the enclosing BUILD_TESTING section. Limits: GuestLibcAnnexkRsizeMax.cpp implementation/assertions are outside this CMake-only pair.
  • feat(libc): export the versioned std::__sce_v2 filesystem primitives #10989 74ce435fab44e28eb7a6c7ab67e35077d4c0b92f, core/libs/prx/libc/CMakeLists.txt (patch SHA256 f6cda36a1d15002c2759db52f770488e478ab08e5368fcd8bfd2a473cda99931): Adds VersionedFilesystem.cpp and guest_sce_v2_filesystem executable/test; links libc, libkernel and zarchive, configures unwind, timeout20 and WIN32 libc PATH prepend. Retain new source entry, full three-library dependency list and guarded registration while preserving guest_qsort registration and current owned source list. Limits: New implementation/fixture bodies and dependency availability were not reviewed/configured here.
  • feat(relinker): support short scalar guest GS instructions #11661 1358bef8f5c8e28a2af940250b8d7e63a68e911b, core/libs/prx/libc/CMakeLists.txt (patch SHA256 663232d776151c268bcecb419d36cbc4262f6eec339c5a704ef92b98d59dc867): Adds the same GuestGs.cpp source-list hunk as the other two GuestGs candidates; the selected target_sources addition is unconditional. Preserve owned guest_qsort block and existing sources. If composing these candidates, reconcile the intended single GuestGs.cpp entry instead of duplicating source-list additions; separately resolve implementation ownership/platform behavior. Limits: Identical selected CMake patch hashes do not prove GuestGs.cpp bodies identical. No compile guard or platform compatibility is established by the filename.
  • feat(relinker): support SSE guest GS memory accesses #11689 7f992f4931a6bcf3b1e255d3b9a06c164ea79751, core/libs/prx/libc/CMakeLists.txt (patch SHA256 663232d776151c268bcecb419d36cbc4262f6eec339c5a704ef92b98d59dc867): Adds the same GuestGs.cpp source-list hunk as the other two GuestGs candidates; the selected target_sources addition is unconditional. Preserve owned guest_qsort block and existing sources. If composing these candidates, reconcile the intended single GuestGs.cpp entry instead of duplicating source-list additions; separately resolve implementation ownership/platform behavior. Limits: Identical selected CMake patch hashes do not prove GuestGs.cpp bodies identical. No compile guard or platform compatibility is established by the filename.
  • feat(relinker): support VEX guest GS memory accesses #11698 998fd58bf95dcf91fadd019b8ab6e6c3808c11df, core/libs/prx/libc/CMakeLists.txt (patch SHA256 663232d776151c268bcecb419d36cbc4262f6eec339c5a704ef92b98d59dc867): Adds the same GuestGs.cpp source-list hunk as the other two GuestGs candidates; the selected target_sources addition is unconditional. Preserve owned guest_qsort block and existing sources. If composing these candidates, reconcile the intended single GuestGs.cpp entry instead of duplicating source-list additions; separately resolve implementation ownership/platform behavior. Limits: Identical selected CMake patch hashes do not prove GuestGs.cpp bodies identical. No compile guard or platform compatibility is established by the filename.

Owned contract retained: Selected owned input is CMake, so the reviewed contract is guest_qsort_tests registration, not unprovided GuestQsort.cpp assertion bodies: source GuestQsort.cpp, LIBS_INCLUDE_DIR, link libc, configure_windows_unwind, test guest_qsort, TIMEOUT 20, WIN32 libc directory PATH prepend. Keep BUILD_TESTING nesting and existing source list. No configure or inventory was run; no claim about future discovered test counts.

Proof classes: 5 actual-merge-base raw reconstructions; 0 cached complete-primary patches. Existing published ABI/runtime evidence remains pinned to its original head/control/environment; no new build, test, merged composition, author ordering or whole-table approval is claimed. AI-assisted (Claude Code).


Bounded libc debt-source supplement for #12271

Target source 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff; counterpart pins below are from the frozen 2026-10-30 05:42 UTC metadata map. This reviews only complete selected docs/dev/debt/libc.md patches: 12 candidate/path scopes (27 added, 5 deleted lines; 18 hunks). No implementation/export correctness, combined build/runtime, landing order or whole-table clearance is claimed. Historical test and review pins remain unchanged.

Keep mergesort's own null/overflow exceptions versus the inspected SDK binary, size-under-four EINVAL/failure behavior, FreeBSD source and libbsd comparator-order check explicitly distinguished from a console run.

The selected added/deleted debt paragraphs concern the following separate subjects; none replaces this target's own debt paragraph. During composition preserve both, and resolve overlapping foreign replacement paragraphs against the actual implementation rather than restoring stale text from hunk context.

Scoped counterparts at examined head Preservation/action
#9867 56b82ac96e61, #10113 81fa0ec111f4, #10222 de5fd246210f, #10349 71a6a726c99b, #12053 2d2c5d945357 Math and floating environment: Keep each numerical helper entry and its exact provenance: host execution of a bundled library is not console execution; FMA/SDK, rounding, DAZ/FTZ, sampled inputs and unmasked-exception limits stay attached to the specific helper. Reconcile overlapping replacement paragraphs against the actual composed implementation rather than letting a context block restore stale host/port wording.
#8965 65c7c4abe424 Formatting, scanning and secure conversions: Preserve separate narrow/wide, secure/plain and string/stream distinctions, size/error/constraint-handler policies and module-specific measurements. Conflicting handler descriptions and buffer-capacity rules across these independent patches need implementation-matched wording during any composition; this review does not choose one foreign implementation.
#12586 6b3ffd47d159 Buffer comparison and provenance: Preserve the recorded FreeBSD 11.4 timingsafe_bcmp.c source, ISC / Copyright (c) 2010 Damien Miller attribution, 0-if-identical/1-on-difference result convention and content-independence requirement. This review did not measure constant-time execution or approve the foreign implementation; the target's own function contract remains separate, with no new dependency inferred.
#12920 b72b61741b9d Streams and host diagnostics: Keep per-operation stream-lock, buffer/error, descriptor and platform caveats separate from this target's search/mode/sort contract; prose for getline or diagnostics does not qualify either implementation.
#11661 1358bef8f5c8, #11689 7f992f4931a6, #11698 998fd58bf95d Runtime, signals and thread lifetime: Preserve GS registration/unload, signal-buffer, platform and unsupported-path caveats. These runtime notes do not change the target's search/mode/sort debt or establish a new interface dependency.
#10989 74ce435fab44 Filesystem, parsing and licence provenance: Preserve filesystem stubs and source/layout limits, getsubopt state handling and required upstream licence provenance. A debt-only note neither implements an export nor waives code conventions.

Specific source distinctions:

This is AI-assisted source/documentation review. Shared prose supplies no new prerequisite, author consent or runtime qualification. Existing source/interface, CI and explicit dependency obligations remain separate.


New captured source intersections, source only

Against owned 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff:

  • feat(relinker): execute supported scalar guest GS accesses on Windows #11628 cedb9ac8cddc5083dff0b477dd406313ec8a6bcc, selected libc CMakeLists.txt: adds GuestGs.cpp once in the existing libc PRIVATE source list. Preserve Mergesort.cpp and guest_qsort's target, libc link, unwind setup, selector, timeout20 and Windows PATH properties. The selected edit applies to the owned CMake text in memory with that wiring unchanged; this does not verify GuestGs implementation, cross-platform linking or a build.
  • fix(libc): check sprintf_s and vsprintf_s as titles' libc.prx does #12622 1dd0d4a860eefb9ee7834d67e110c1e0e20cfc6b, selected libc.md: preserve distinct secure sprintf/snprintf versus wide rules, handler-module differences, removed obsolete vsscanf_s debt and measurement/ABI limitations. Keep the independent mergesort paragraph's null/overflow exceptions, element-size/allocation errors and FreeBSD/libbsd-versus-console distinctions.

No foreign implementation, pairwise runtime, author order, new mergesort dependency or whole-table clearance is claimed. Historical tests keep their original pins. AI-assisted (Codex).

Bounded added-family supplement for #12271 at 3483366e8300fd3c06c711026e7f7c15ae76e6a9 (frozen main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4):

Reviewed #12688 5dce7fea277f92c9e74db908ba1a0a5e0ebbe5c6, #12700 daa3a810cbb43e399e3912df6bf3edb4221ef98c, and #12965 e01288c9204944ae5befa08a514fb7d93443ac03. The complete file indexes give three shared paths per candidate, nine relations total. Their selected patches have identical changed/context lines; #12965's debt hunk has an offset-only difference.

Shared path, per candidate Source finding and preservation
libc/CMakeLists.txt, +1/-0 Keep the added src/DescriptorAccess.cpp registration and this PR's src/Mergesort.cpp, each once in libc's source list. Nearby source-list edits do not establish a combined merge/build result.
libc/src/FileAndHeap.cpp, +18/-0 Keep descriptor-update admission in the two Windows append helpers and the optional descriptor-close registration/begin/end callbacks. These blocks are separate from the removed old mergesort_nid_postfix; keep the replacement in Mergesort.cpp. Its reviewed connection to this translation unit is the existing allocator/free API, not those I/O helpers.
docs/dev/debt/libc.md, +1/-1 Preserve the full setjmp/longjmp note's signal-mask offset 72 and flag 88, plus its new context-identity-at-92 I/O-lifetime metadata and console-unverified qualification. It is separate from this PR's mergesort rationale/link replacement.

These source findings add no native-I/O cancellation/runtime qualification or dependency agreement. They do not prove textual mergeability, combined execution, console behavior or clearance of the rest of the overlap tables. Historical tests keep their original pins.

Frozen shared-file source follow-up for #12271 (2026-10-30 snapshot)

Source target 4980f2197d7db42783f599b5776b25105ad48405; overlap comment6462559173 updated2026-10-30 23:19:42 UTC listed29 skipped rows (53 path tuples) and one compared row (#11625, one path):30 PRs /54 selected path tuples. Earlier appended source findings are included; the older28-row heading does not describe this frozen review.

At the publication guard on 2026-10-31, the latest bot update (10:35:33 UTC) listed24 PRs /42 selected path tuples. This frozen30-PR/54-tuple review does not clear that newer selection; its newly listed #10780 debt-file tuple remains unreviewed here. Removed rows do not establish merged status or no overlap.

The selected files were checked at the pins below against their actual common bases and current target text.34 private per-file compositions are clean;20 need explicit textual resolution, including adjacent insertions and replacement-paragraph conflicts. These are source dispositions, not whole-PR merges, builds or runtime results. Keep Mergesort.cpp, the complete guest_qsort wiring and the current mergesort debt paragraph; do not restore the removed old mergesort body in FileAndHeap.cpp.

PR / examined head Selected paths and preservation
#11625 ebf93ca4f62a55df2ef1001b811d1a013a8ef495 debt: Compared row has two actual edits: archive mapping/resource/platform limits and removal of stale mmap example from macOS exception note. Retain exact current Mergesort.cpp paragraph; its foreign FileAndHeap paragraph is context, not a changed note.
#5021 151294f979ab00aaff2f702314425caf61a72790 CMake: Add StringLength.cpp; keep the intended ANYPS5_NATIVE_GRAPHICS early return distinct from ordinary BUILD_TESTING registration, and move exception_runtime under NOT APPLE. This guard suppresses all later test registrations in that configuration; no unchanged workload claim. Retain Mergesort.cpp and guest_qsort wiring in ordinary test configurations. debt: Append bounded ARM64 CRT-profile paragraph without deleting the30 current tail paragraphs. Retain x87 exclusion/extended-argument rejection and no x87 compatibility claim.
#5303 fb98512bf7ee58032649cb02b336e5881f4a26a7 debt: Add wide-printf paragraph with measured system-module versus unmeasured bundled-title/extension/incomplete-conversion/secure-wide limits. Clean selected-file composition.
#6085 ffea0b7c1d088005e99ee30256c4decf2834d34d CMake: Insert the complete guest_dsign target/include/libc link/unwind/selector/Windows PATH block alongside current guest_strtod_subnormal, with independent if/endif boundaries; do not pick one side of their shared-insertion conflict.
#7081 e6f5d4c71b6ff42a43ee1c90b9b3fc912efdad7b CMake: Register SonyCrt.cpp once; retain Mergesort.cpp once. FileAndHeap: fopen_s calls SonyInvokeConstraintHandler on null result/path/mode; preserve both error branches with SonyCrt source/declarations. Does not edit mergesort or allocator/free functions. debt: Merge only shared localeconv/constraint-handler changes: retain current setlocale-only-C and unmeasured table qualifications and the separate setlocale paragraph. Shared cross-module handler visibility remains unverified.
#7386 bf7352321cf85d1bfdfe402f3fba7b2d90c683eb debt: Replace only scanf paragraph for accepted-UTF8-prefix consumption and removal of stream-wide rejection; preserve current bad_optional_access wording and separate _Throw(bad_array_new_length) note in conflicting context.
#7447 dead12ebad24a3c4b01a05c14ab60cc06aacaf7d CMake: Register AppArchiveStream.cpp once and the archive stdio target with libc/libkernel/zarchive, five modes, timeout20 and libkernel Windows PATH. Retain guest_qsort wiring. FileAndHeap: Adds CloseOwnedStream archive detach and archive-aware fopen path/resolver/open/deleter changes; keep their coupled archive helpers, not an isolated fopen transplant. Removed old mergesort body remains removed. debt: Replace only app0.zar paragraph with archive fopen temporary-backing/resource/restriction prose; keep current _Exp/_FExp and exp2f neighbors. This is host packaging, not console PFS.
#7715 783fa9b83f5f0ac617d4b0f05321a34c1279cb7f CMake: Keep complete asobi_root_environment and current guest_dinkumware_atomics/internals blocks, each with its own Windows PATH/endif; do not replace the current blocks in the insertion conflict. debt: Add ASOBI_ROOT qualification to current environment paragraph without dropping its FreeBSD value-storage/lifetime/reuse caveats. Keep current Mergesort.cpp paragraph and macOS exception note; foreign old mergesort context is not an edit.
#8150 6a9b1285c596904698bb0511c14f7c04302b708b CMake: Add file_streams_random_character_input, retain original file_streams, and extend timeout20/PATH properties to both. Keep separate guest_qsort unchanged. debt: Replace only random-device paragraph to add unsigned character entropy operations; retain neighboring setvbuf/setbuf note. Keep existing unsupported/write and freopen limitations for this candidate.
#8965 65c7c4abe424979778bae6f529d2afee8a03086f CMake: Add GuestLibcAnnexkRsizeMax target/libc link/unwind/timeout20/Windows PATH once; retain guest_qsort. debt: Replace only AnnexK and fopen_s paragraphs with function-specific measured/inferred limits; preserve unmeasured default handler and cross-function extrapolation distinctions. Do not transfer these policies to mergesort.
#9340 3f2fa3b280504410e7ff6ed94dfd435992f1d92c debt: Replace only scanf paragraph for surrogate-pair/unit-count/unsized-lc limits; retain current neighboring exception entries. Independent from7386: combined scanner wording must match the actual combined implementation.
#9371 9ea4c6561be22466166fb26fa61cd2eb0d23f2cf debt: Add Windows link-before-dotdot paragraph without deleting adjacent current notes; keep file-type symlink EACCES/ENOTDIR exception and Windows measurement scope.
#9447 2dc7b701a4d72515be281c8e469fb14c5a588d63 debt: Add versioned thread/clock paragraph while retaining current _Pad/thread note and all later notes; keep saturation-versus-wrap, realtime-not-monotonic and unimplemented exit-registration limits.
#9526 1da5b7cd5c8904a515d275f1677f7fbaedf8fe34 FileAndHeap: Adds distinct versioned _Fiopen with twenty-entry mode table, no-create/app transforms and ate close-on-seek-failure. Keep separate from replacement Mergesort.cpp; no mode/runtime validation inferred. debt: Add all three versioned setw/Fiopen/Xregex notes; retain current _Pad and later notes. Preserve layout/NID, unmeasured console and separate exception-type dependency qualifications.
#9863 b48707c2497061f0fcb80046299bc8420f9a0ede debt: Manual single scanner-paragraph conflict: integrate short-field/size/provenance edits while preserving current pointer-length/scanset/range/unknown-conversion clauses. Current span equals prior11664 reviewed span; exact private single-span preview retained.
#10324 a12f8fc4d39b701fa2047a0a3a3a090be2d3562c CMake: Add current GuestFwide target/libc+CMAKE_DL_LIBS link, explicit libc executable argument, timeout10 and Windows PATH once; retain guest_qsort. FileAndHeap: Adds Orientation(-1) in nonzero fread/fwrite and fputs, not in zero-length returns. Requires matching stream orientation implementation; keep removed old mergesort body removed. debt: Append fwide paragraph with first-operation/zero-length/reopen distinctions, mixed calls still run, and no console measurements; retain mergesort unchanged.
#10405 7d100f768e4f52970f417d0db32b11942a56ae2c FileAndHeap: Adds ResetWideConversionState only after successful fseeko. Current target FileStream.hpp lacks that member; an isolated selected hunk is not a self-contained source integration. Couple the foreign stream state/header implementation when composing; no runtime approval or mergesort dependency inferred. debt: Append fgetwc/getwc/getwchar C-locale conversion paragraph, FILE+0x60/16-bit/incompleteEOF details and unverified console refill scope. The debt-file textual composition is clean; the FileAndHeap state reset still requires its matching header/state and is not qualified as an isolated transplant.
#10620 e465f47d929d32f850d6b9e31ab49c12c9f74eb7 FileAndHeap: Factors exact random-device path/null-device helpers and adds random freopen Reopen/MarkRandomDevice path with write rejection and failure cleanup. Preserve coupled FileStream semantics and current mergesort relocation; no random-device lifecycle qualification. debt: Replace only random-device paragraph to include freopen; retain complete adjacent current setvbuf/setbuf note. Independent8150 character-input paragraph needs implementation-matched reconciliation if both are composed.
#10729 31cc00b5d822a4e2e7c0eead1e3e42ac5950c82c debt: Manual single scanner-paragraph conflict: replace only _WStoul invalid-base throw description with return0/end-start/errno-unchanged and console-unverified caveat, preserving every current scanner clause.
#11332 793a55ba18497e36f1038242dae9d7e707641f35 debt: Replace snprintf overflow-only sentence with EOVERFLOW84/-1 result and retain unmeasured extreme-field scope; separate from mergesort overflow contract.
#11628 cedb9ac8cddc5083dff0b477dd406313ec8a6bcc CMake: Add GuestGs.cpp once to libc PRIVATE sources, preserving current source list and all guest_qsort wiring.
#11661 1358bef8f5c8e28a2af940250b8d7e63a68e911b CMake: Same exact GuestGs.cpp registration edge as11628; preserve current source list and guest_qsort wiring. debt: Keep both Windows GS continuation and metadata/lifetime paragraphs; append metadata after the five existing log-file notes rather than replacing them in the EOF conflict.
#11689 7f992f4931a6bcf3b1e255d3b9a06c164ea79751 CMake: Same exact GuestGs.cpp registration edge as11628; preserve current source list and guest_qsort wiring. debt: Exact selected GS debt base/head matches11661; retain both GS paragraphs plus all five current log-file notes.
#11698 998fd58bf95dcf91fadd019b8ab6e6c3808c11df CMake: Same exact GuestGs.cpp registration edge as11628; preserve current source list and guest_qsort wiring. debt: Exact selected GS debt base/head matches11661; retain both GS paragraphs plus all five current log-file notes.
#12057 b03facfbd4ab0e7dee657cd827d6806cf99d19a0 debt: Replace update-stream paragraph with unbuffered-UCRT-one-byte qualification, retaining read-ahead/Linux difference and FreeBSD comparison scope. Clean selected-file composition.
#12363 3f865021bf6ca3db4c253e88d10334307c74b25e debt: Append Hypot/FHypot/LHypot paragraph retaining signatures/NIDs, licence notice,1ULP sample limitation and unverified flags/rounding; no foreign implementation approval.
#12682 55161f97476a8bd413c279829cabb6390307e4d5 CMake: Register DescriptorAccess.cpp once alongside retained Mergesort.cpp. Same selected base/head source as12688/12700. FileAndHeap: Adds Windows append descriptor-update admission plus optional close-callback registration/begin/end wrappers. Same exact selected base/head source as12688/12700; preserve Mergesort.cpp and allocator/free linkage separately. debt: Retain setjmp signal-mask72/flag88 and add context-identity92 lifetime metadata with console-unverified qualification; same selected raw base/head as12688/12700.
#12688 5dce7fea277f92c9e74db908ba1a0a5e0ebbe5c6 CMake: Register DescriptorAccess.cpp once alongside retained Mergesort.cpp; exact published source finding reusable. FileAndHeap: Retain reviewed Windows descriptor admission and optional close-callback blocks; do not restore removed old mergesort. Published selected source finding reused, no I/O runtime acceptance. debt: Retain complete setjmp/longjmp note plus new identity92 metadata and console-unverified limits; exact published source finding reused.
#12700 daa3a810cbb43e399e3912df6bf3edb4221ef98c CMake: Register DescriptorAccess.cpp once alongside retained Mergesort.cpp; exact published source finding reusable. FileAndHeap: Retain reviewed Windows descriptor admission and optional close-callback blocks; do not restore removed old mergesort. Published selected source finding reused, no I/O runtime acceptance. debt: Retain complete setjmp/longjmp note plus new identity92 metadata and console-unverified limits; exact published source finding reused.
#12965 e01288c9204944ae5befa08a514fb7d93443ac03 CMake: Register DescriptorAccess.cpp once alongside retained Mergesort.cpp; exact published source finding reusable at its distinct08a10 base. FileAndHeap: Retain reviewed Windows descriptor admission and optional close-callback blocks; do not restore removed old mergesort. Distinct actual base retained; no I/O runtime acceptance. debt: Retain complete setjmp/longjmp note plus new identity92 metadata and console-unverified limits. Distinct08a10 base; selected patch semantics match published review.

The published #12688/#12700/#12965 findings retain their original source scope: their current selected target files are byte-identical to reviewed3483366. #12682 has the same selected base/head bytes as#12688/#12700; #12965 retains its distinct base and offset-only patch difference.

In particular, #10405’s stream-state reset requires its matching header/state implementation, absent from this target’s current header; this isolated hunk is not qualified for transplantation. #5021’s native-graphics guard intentionally suppresses later test registration in that configuration. Neither establishes a new mergesort dependency.

This update does not approve foreign implementations, combined runtime, console behavior, author order, current-main integration or all checks. Existing #11621/#11833 qualification and all historical test/review pins remain unchanged. AI-assisted (Claude Code).

#10780 skipped debt-file comparison (source-only)

At #12271 head 4980f2197d7db42783f599b5776b25105ad48405, the selected docs/dev/debt/libc.md delta replaces only the existing mergesort debt entry. At #10780 head 7a0a378760b72d2c731bdb0d6772acfe82ed097c, the delta adds one _LExp debt entry and leaves the old mergesort entry byte-for-byte unchanged from #12271's base. These edits document separate debt entries in the same file; composing the two deltas retains the revised mergesort note and adds _LExp. I found no duplicate or contradictory debt entry in this selected tuple.

Sources: #12271, #10780. Exact target and counterpart file heads/bases are pinned in the private source-disposition receipt.

Scope is only these two exact file deltas. This does not verify #10780 implementation or console behavior, and does not claim any other overlap row, clean merge, combined qualification, approval or landing.

@B-Howell

Copy link
Copy Markdown
Contributor Author

Follow-up to the actual compared conflicts in overlap comment6462559173, for this PR at e80f7038fdaa6809ad361cb309ded3265d855d32.

I inspected the listed shared-file patches for 1 compared candidate at the heads below. This is separate from the earlier skipped-comparison review.

These scoped findings do not establish clean pairwise merges or a successful combined build/test. They do not clear other review, CI, dependency or current-head verification obligations.

@Aspct3434 For the shared debt edit I propose #12054 first, then I will preserve your environment-lifetime paragraph when refreshing this PR after its existing #11621/#11833 predecessors. Please confirm or propose another order. I will add the confirmed ordering dependency to the checklist; no agreement is claimed yet.

AI-assisted: yes (Codex).

@B-Howell

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Please re-review the blocking license finding in review 5680044826 against current head fa5b07684d1be2a632b7e60fed67744dc1080bf2.

The original FreeBSD 11.4 copyright, Peter McIlroy attribution, conditions and disclaimer were added verbatim in e80f7038fd, following @oneandonlydean's request 6464927524. The full Mergesort.cpp blob is unchanged by the normal merge of main 319621ba; the original 1680-byte notice still has SHA-256 7786a47eb8f4e606409320291ade687ce9a3b2486a6a5d06edcf21f215460d99. No new source was imported or license text edited in this integration.

The integrated Windows MSYS2 UCRT64 GCC16.2 build passed, guest_qsort passed three executions, and conventions passed. The description now explicitly limits comparator-order evidence to the FreeBSD/libbsd reference; console ordering remains unmeasured. #12054 ordering remains unconfirmed, and this main integration does not combine its branch or the existing declared predecessors. These updates address the recorded finding; they are not a replacement for your current-head review.

AI-assisted: yes (Codex).

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — changes requested

License finding resolved

I compared the notice in exact head fa5b07684d1be2a632b7e60fed67744dc1080bf2 with the 11.4.0 merge.c source. The 1,680-byte copyright, Peter McIlroy attribution, three redistribution conditions, and disclaimer are byte-for-byte identical to FreeBSD's source. The SPDX identifier and source link are also present. My earlier missing-attribution finding is resolved.

The author reports the exact-head Windows guest_qsort run passing three times; hosted Windows, relinker, conventions, and eligibility checks pass. I did not rerun tests locally. The reported runtime integration used main 319621ba2e; current fetched main is 2960e9a6e7, 232 commits ahead. The current-main merge preview is clean, but the focused runtime check has not been reported on that current integration.

Remaining repository blockers

  • The shared docs/dev/debt/libc.md edit with open #12054 still has no author agreement on order. Your proposal is #12054 first, but #12054's author has not confirmed it and its checklist still says Depends on: none. Please get agreement and declare the dependency on the second PR; the declared #11621 and #11833 prerequisites remain open as stated in this PR.
  • Please refresh onto current main and rerun guest_qsort on the integration that preserves the ordered debt edits and open prerequisites.

I am requesting changes only for the unresolved order and current integration validation; the license notice is accepted.

@B-Howell

B-Howell commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Updated and normally pushed #12271 to 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff, integrating main snapshot 4c8cff191609bc5f28bf9ee2f93672b531285aa4 without rewriting the published history. #12054 is now landed and verified reachable from that main; its order blocker is resolved. The accepted license notice is retained.

The committed tree f215ab2e48acec003def2a008340fa54d041bec6 exactly matches the rebuilt/tested tree. Windows, MSYS2 UCRT64 GCC 16.2.0, Ninja Release: guest_qsort_tests builds, and ctest --test-dir build-compare -R '^guest_qsort$' --repeat until-fail:3 -V passes 3/3, no skips. Conventions and independent source/log/binary review pass. Main's environment/other debt is preserved; only the mergesort entry is replaced.

The focused build uses CMAKE_SKIP_INSTALL_RULES=ON after an nghttp2 export-set generation error. Installation/export behavior and fresh Linux/macOS, game or GPU runs are not claimed. The PR description records this and retains prior evidence separately.

Please re-review this exact head. #11621 and #11833 remain open prerequisites, and new-head CI, human approval and upstream landing are still pending.

AI-assisted: yes (Codex).

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 29, 2026

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-checked — new head, looks good

The license notice is now present and matches the FreeBSD 11.4 source; the remaining order and current-integration points are addressed or correctly tracked as dependencies.

What I ran

Reviewed exact head 71e256be573e11d1e59d5ba8b4b0d6cefbcd4eff, PR base 4c8cff191609bc5f28bf9ee2f93672b531285aa4, and current main fdd1753204a4732e1011539cc9d3bb69f70b27a6. The merge preview is clean. On Linux, without building, I ran:

git diff --check upstream/main...refs/review/pr-12271
python3 tools/check_conventions.py --base upstream/main --head refs/review/pr-12271
git merge-tree --write-tree upstream/main refs/review/pr-12271
cmp -s /tmp/anyps5-merge-license.txt /tmp/freebsd-merge-license.txt

The cmp compares the 31-line BSD notice from the exact PR head with the corresponding notice from FreeBSD merge.c at commit 8c639945a44588f6cfdddfb057bb5aad88735da0. I also confirmed Mergesort.cpp is byte-identical to the previously reviewed source. I did not build or run tests locally.

Results

Check Result
Diff whitespace check Passed.
Repository conventions Passed.
Current-main merge preview Clean; tree eb3ff54249f8134c5aab963bde0a05ba3d2a2a45. The only PR-touched path changed on main since the PR's base is the debt document; the merged preview preserves both the mergesort and existing debt entries.
BSD notice comparison Passed; both 31-line files have SHA-256 ea45247eefad9ad1bc05d4c8fc96a80fcda304a01ed54e570ffeceb7bb75ec36.
Author-reported tests The author reports the tested tree f215ab2e48acec003def2a008340fa54d041bec6 matches this head and guest_qsort passed 3/3 on Windows 11/MSYS2 GCC 16.2.0.
Hosted CI Windows, Ubuntu register-context, relinker, ASan, conventions, eligibility and report passed; Linux product tests were skipped; macOS jobs were pending.
Raw output from local checks
diff_check_exit:0
All conventions checks passed.
eb3ff54249f8134c5aab963bde0a05ba3d2a2a45
license_cmp_exit:0
ea45247eefad9ad1bc05d4c8fc96a80fcda304a01ed54e570ffeceb7bb75ec36  /tmp/anyps5-merge-license.txt
ea45247eefad9ad1bc05d4c8fc96a80fcda304a01ed54e570ffeceb7bb75ec36  /tmp/freebsd-merge-license.txt

Sources

Not verified

I did not independently run the Windows guest_qsort test or verify console behavior. The Windows results are author-reported; macOS jobs were still pending when checked. #11621 and #11833 remain open and are declared prerequisites; this review does not approve their changes.

@B-Howell

B-Howell commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor Author

Qualification update for #12271: published-candidate source 3483366e8300fd3c06c711026e7f7c15ae76e6a9, frozen main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4.

Frozen-main refresh qualification: 3483366e8300fd3c06c711026e7f7c15ae76e6a9 on main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4.

Windows/MSYS2 UCRT64 GCC 16.2.0 Rev6 and Linux/WSL GCC 11.4, Release, separate new build directories, at most two jobs, serial arms/platforms. The isolated PR candidate passed the existing guest_qsort CTest once on each OS. All four frozen arms passed:

Arm Commit Windows Linux
Main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4 1 pass 1 pass
Heapsort fixture PR 66b4ecb13df784ba4a49c777d054bed39c260650 1 pass 1 pass
Mergesort PR 3483366e8300fd3c06c711026e7f7c15ae76e6a9 1 pass 1 pass
Private combined check 9741133de15e810cc06b4cc69fec378bdd053b04 1 pass 1 pass

Eight native executions total, zero failures/skips; one registered test per arm, 20-second test timeout. Source groups differ as the PRs add their regressions. Every arm built production libc and its own fixture; Windows PE/CTest search paths and Linux ldd resolve the corresponding module. Recorded conventions checks passed on all eight arms. Independent source and result reviews passed.

The Mergesort implementation blob and FreeBSD notice remain identical to the previously qualified topic; main qsort_r ordering and validation coverage is retained. The private combined check preserves both helper groups and calls; its result is separate from either public PR and does not establish landing order. Historical algorithm, corpus, negative-control and hosted results below retain their original pins and were not repeated by this refresh. Dependency agreements, current-tip follow-through, human/hosted-CI review, remaining overlap obligations and verified main landing remain open.

AI-assisted: yes (Codex).

Hosted CI follow-through on 3483366e8300fd3c06c711026e7f7c15ae76e6a9

Both macOS write-watch jobs stopped during CMake configuration: write_watch_execute-fault and write_watch_read-fault are each registered twice. The build and CTest steps were skipped; these are not macOS test passes. macos-15-intel job, macos-15 job.

The complete core/libs/tests/write_watch/CMakeLists.txt bytes match this PR head, its frozen tested main 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4, and freshly observed upstream main 4bc9e779aa7abb2109c65ee3bca19e1b85df3be8. That identifies a shared configuration blocker; it does not qualify macOS or change the pinned Windows/Linux sort results above. No CI rerun was requested.

CI configuration prerequisite — 2026-10-30

CI-only integration 4980f2197d7db42783f599b5776b25105ad48405 (tree c1d2e4c2f70bb8b867a0d505deed4bebd1c206b8) retains original #13220 commit e9f09f54fabb6408d3e2711b8df10c10112ab00e as its second merge parent, after 3483366e8300fd3c06c711026e7f7c15ae76e6a9. Whole-tree and source-pin verification confirms only core/libs/tests/write_watch/CMakeLists.txt changes: five lines deleting the repeated execute-fault/read-fault registration. No libc implementation or fixture source changes.

Configuration-only comparison used the exact exported four-file graphs: the old graphs match across #11831/#12271, the fixed graphs match across both integrations, and all three companion C++ files are unchanged. Two shared arms per OS were configured serially: Windows CMake 4.4.4 / WinLibs GCC 15.2.0 r7 / Ninja 1.13.2 and WSL CMake 3.22.1 / GCC 11.4 / Ninja 1.10.1. Both old arms failed on both duplicate names after genuine native compiler/Threads probes; both fixed arms configured/generated successfully. Each fixed generated inventory contains exactly 18 unique name/executable/mode mappings with 30-second timeouts. These are four configure checks (two expected RED, two GREEN), not 18 runtime passes. No fixture build or CTest execution occurred.

The isolated two native sort passes remain pinned to 3483366e8300fd3c06c711026e7f7c15ae76e6a9; the earlier four-arm/eight-execution group retains all four original pins on frozen 3d19f3fed31be38d7196ea1bd74e29ab6cc3c9a4. Those executions were not repeated or retargeted. Existing #11621/#11833 dependencies, landing order, current-tip follow-through, human/bot review and verified main landing remain open.

New-head hosted CI qualification remains pending after publication. No macOS tests were run locally; the earlier hosted failure and all historical results retain their original heads. This configuration result does not establish platform/runtime, whole-product or dependency-order clearance.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 1, 2026

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

Labels

build docs libc needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants