Skip to content

feat(libc): implement reallocarray - #11846

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
heditrigui:feat/libc-reallocarray
Oct 27, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
heditrigui:feat/libc-reallocarray

Conversation

@heditrigui

Copy link
Copy Markdown
Contributor

What

Implement reallocarray in libc matching FreeBSD/POSIX behavior with integer overflow protection, and add test coverage in ApplicationHeap.cpp.

Tested

Ran python tools/check_conventions.py --base upstream/main cleanly (0 errors).
Ran python core/libs/tests/test_public_headers.py --audit-only cleanly.
Ran python tools/progress.py verifying progress increase (libraries 6567/13449 -> 6568/13450).

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

Copy link
Copy Markdown

Progress report (801d5b9 → 3d17309)

📈 System libraries: 48.83% (+0.0038%, +1 implemented functions)

✅ 1 implemented
Library Name
libc reallocarray_nid_postfix

Changed libraries (implemented exports)

Library Before After Change
libc 1403/1412 (99.36%) 1404/1413 (99.36%) +0.00 pp

@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 11850 docs/dev/debt/libc.md L44-45
PR 11870 docs/dev/debt/libc.md L43-44

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 docs/dev/debt/libc.md
PR 6713 core/libs/tests/ApplicationHeap.cpp
docs/dev/debt/libc.md
PR 7081 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/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 7648 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8937 core/libs/prx/libc/include/Api.hpp
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 9929 docs/dev/debt/libc.md
PR 10324 core/libs/prx/libc/include/Api.hpp
core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 10433 core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 10620 core/libs/prx/libc/src/FileAndHeap.cpp
docs/dev/debt/libc.md
PR 11332 docs/dev/debt/libc.md

@maskym

maskym commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Windows result for head 3d17309724, merged into main 75f3702aed (the PR's Tested section names no Windows run).

Host: Windows 11 26300, Intel i7-12700K, WinLibs GCC 15.2.0 (x86_64-ucrt-posix-seh, r6), Release, BUILD_TESTING=ON, Ninja. Build clean.

The tree also carried the open libc PRs #11793, #11773, #11890 and #11843, all merged cleanly, so the run is a joint one; the tests of this PR are the application_heap_* ones. The six registered on Windows passed (application_heap_replacement 0.05 s, _invalid_metadata, _default, _exit_order, _scripting, _lazy); application_heap_guest_sdk* are Linux-only in libc/CMakeLists.txt. Not run on a PS5.

AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine.

@oneandonlydean oneandonlydean self-assigned this Oct 27, 2026
@oneandonlydean
oneandonlydean merged commit 6e9b913 into boykopovar:main Oct 27, 2026
18 checks passed
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.

3 participants