docs(libc): record reallocalign to size 0 as measured on a PS5 #11259
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/11259"
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 orezraey on 2026-10-25T22:52:21Z.
What
This records
reallocalignto size 0 as measured with the console's heap (the systemlibSceLibcInternal) on a retail PS5 (firmware 13.60). The heap debt entry ended with "reallocalign(ptr, 0, alignment)for a block without that alignment was not measured and throws". That case is now measured and gets its own entry, with the remaining gap first. Onlydocs/dev/debt/libc.mdchanges. Measured with a homebrew probe from a payload process; the source and console log are in this gist (preallign).On the console:
malloc(24)block aligned to 64 but not 256, givenreallocalign(p, 0, 256), came back as a different block: 256-aligned, 0 usable bytes,errnountouched. AnyPS5 throws here. Whether the console frees the old block is not known, so implementing it would assume that, and it stays a recorded gap.reallocalign(p, 0, 16)on that 256-aligned block returned the same block;reallocalign(NULL, 0, 256)returned a 256-aligned block with 0 usable bytes;reallocalign(q, 64, 3)moved the block to a 64-byte alignment with 64 usable bytes and kept its contents.Tested
Documentation only. Head
18e69a439fonmain49d1f9b07e.tools/check_conventions.pypasses; both entries are under 1000 characters.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-25T22:56:59Z.
Review: APPROVED
Reviewed the exact head and the linked console probe source/log. The recorded realloc-to-zero cases match the captured return pointer, alignment, usable-size and errno results, while the old-block ownership uncertainty is retained as an open gap. The documentation diff is clean; current-base conventions pass. This is documentation-only, so no product build was run.