docs(libkernel): record cleanup unwind and allocation limits #9298
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/9298"
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 UnhealthyKraken on 2026-10-21T17:48:30Z.
What
Record the remaining limits of
pthread_cleanup_push/pthread_cleanup_popin libkernel's technical debt. #8428 reported that the firmware heap form sets an unwind-disabled flag, but the implementation does not model that flag. Runtime-created guest threads skip guest-frame unwinding on exit. The note attributes the firmware reading to that contributor and also distinguishes the current C++ allocation from FreeBSD's failure path; the console allocation-failure contract remains unverified.Documentation only. No runtime or test source changes, and no new console measurement.
Tested
Windows x86-64, GCC 15.2, Release. Built affected libkernel/test targets on current main.
guest_once,guest_pthread_cancel,guest_pthread_cancel_recoveryandguest_pthread_cancel_recovery_coarse: 4/4 pass before and after this documentation change.A local canonical-export probe passes 937 assertions across nine concurrent guest workers: mixed heap/caller records, LIFO cleanup before TLS destruction, execute-zero and nonzero pops, reentrant pop, callback identity, caller-record fields/padding and guard pages. This validates a current-model subset; it does not prove guest-frame unwinding, allocation-failure behavior or heap leak freedom. The probe is audit material outside this PR.
Checked the allocation statement against pinned FreeBSD 11.4
thr_clean.cand the unwind statement against the current thread-exit paths. Independent review qualified the exit statement to runtime-created threads because adopted POSIX threads can fall back to nativepthread_exit. Conventions, whitespace and required overlap checks completed. No Linux or own PS5 run for this audit.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)