libkernel: pthread_attr_getstackaddr is an absent import of 13 catalog titles; fix branch ready #3488

Closed
opened 2026-10-11 11:28:31 +00:00 by Mouad-Scriptz-0 · 3 comments
Mouad-Scriptz-0 commented 2026-10-11 11:28:31 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by Mouad-Scriptz-0 on 2026-10-11T11:28:31Z.


libkernel does not export the POSIX pthread_attr_getstackaddr (DxmIMUQ-wXY, named with tools/nid_names.py against aerolib). scePthreadAttrGetstackaddr and pthread_attr_getstack are on main, the POSIX single-value getter is not. An import audit of the homebrew catalog on main 0f863c10 (Linux) lists it as an absent import of 13 titles, always next to the three attribute functions of #3165:

Title Absent imports on main With this branch
PPSA19111 XashPS5 1.3 4 3
PPSA59322 ccleste 1.00 4 3
PPSA76677 RommPS 1.1.1 4 3
PPSA99002 ProsperoLight 01.000.090 4 3
PPSA99010 vkQuake 1.0 4 3
PPSA99810 PSBox Cloud Gaming 0.9.5 4 3
PPSA97510 PSXS5 2.2.0 5 4
PPSA98510 SwanStationPS5 1.1.3 5 4
PPSA68091 Ruffle Flash 1.2.0 7 6
PPSA99764 Porpoise 2.7 9 8
PPSA85300 VLC 0.3.1 11 10
PPSA99169 RetroArch 1.0.0-beta.1 35 34
PPSA97358 XPSemu Alpha-2.1 36 35

For the first six titles the four pthread_attr_* functions are the only absent imports left: with the #3165 branch (getinheritsched, getscope, setscope) and this one they load with zero. @babyhuey's closing note on #1912 already named pthread_attr_getstackaddr as the stop that ccleste, RommPS and Quake3e reach right after pthread_attr_getscope. #1912 bundled it with the scope and inheritsched functions and was closed before any title reached them; this branch carries only the one function that #3165 does not, so the two merge independently.

Fix branch ready: Mouad-Scriptz-0:feat/libkernel-pthread-attr-getstackaddr (1d2cb8c5, one commit on main 0f863c10). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is (#3433 carried my truncate this way). No open PR adds it (tools/pr_overlap.py --branch reports no overlap; the 127 open PRs were also checked by title).

  • pthread_attr_getstackaddr_nid_postfix(attr, stack_addr) in Pthread/Posix/Attr.cpp, next to pthread_attr_getstack: EINVAL for a null or destroyed attribute or a null output, otherwise the attribute's stackAddress, as FreeBSD libthr's _pthread_attr_getstackaddr (lib/libthr/thread/thr_attr.c) does. A fresh attribute reports a null address, as libthr's default stackaddr_attr.
  • guest_pthread_attr gains: the address set by pthread_attr_setstack reads back, null output and null attribute return 22, a destroyed attribute returns 22, and a freshly initialised attribute reports null.

Tested on Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, full build with BUILD_TESTING=ON, Intel Arc Meteor Lake iGPU):

  • guest_pthread_attr passes 3/3 (--repeat until-fail:3).
  • ctest -j6 -E "^agc_driver_": 534/534.
  • tools/check_conventions.py --base origin/main and git diff --check pass.
  • Table method: catalog release ZIPs checked against their sha256, eboot.bin and bundled modules unwrapped from their SELF containers, relinker --registry, tools/import_audit.py against .prx files built from main 0f863c10 and from the branch. In every title the one import that disappears is DxmIMUQ-wXY. The titles were not run. Not tested on Windows.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5800635477 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3488). Originally posted by [Mouad-Scriptz-0](https://github.com/Mouad-Scriptz-0) on 2026-10-11T11:28:31Z. --- libkernel does not export the POSIX `pthread_attr_getstackaddr` (`DxmIMUQ-wXY`, named with `tools/nid_names.py` against aerolib). `scePthreadAttrGetstackaddr` and `pthread_attr_getstack` are on `main`, the POSIX single-value getter is not. An import audit of the homebrew catalog on `main` 0f863c10 (Linux) lists it as an absent import of 13 titles, always next to the three attribute functions of #3165: | Title | Absent imports on `main` | With this branch | |---|---|---| | PPSA19111 XashPS5 1.3 | 4 | 3 | | PPSA59322 ccleste 1.00 | 4 | 3 | | PPSA76677 RommPS 1.1.1 | 4 | 3 | | PPSA99002 ProsperoLight 01.000.090 | 4 | 3 | | PPSA99010 vkQuake 1.0 | 4 | 3 | | PPSA99810 PSBox Cloud Gaming 0.9.5 | 4 | 3 | | PPSA97510 PSXS5 2.2.0 | 5 | 4 | | PPSA98510 SwanStationPS5 1.1.3 | 5 | 4 | | PPSA68091 Ruffle Flash 1.2.0 | 7 | 6 | | PPSA99764 Porpoise 2.7 | 9 | 8 | | PPSA85300 VLC 0.3.1 | 11 | 10 | | PPSA99169 RetroArch 1.0.0-beta.1 | 35 | 34 | | PPSA97358 XPSemu Alpha-2.1 | 36 | 35 | For the first six titles the four `pthread_attr_*` functions are the **only** absent imports left: with the #3165 branch (`getinheritsched`, `getscope`, `setscope`) and this one they load with zero. @babyhuey's [closing note on #1912](https://github.com/boykopovar/AnyPS5/pull/1912#issuecomment-6107669357) already named `pthread_attr_getstackaddr` as the stop that ccleste, RommPS and Quake3e reach right after `pthread_attr_getscope`. #1912 bundled it with the scope and inheritsched functions and was closed before any title reached them; this branch carries only the one function that #3165 does not, so the two merge independently. **Fix branch ready:** [`Mouad-Scriptz-0:feat/libkernel-pthread-attr-getstackaddr`](https://github.com/Mouad-Scriptz-0/AnyPS5/tree/feat/libkernel-pthread-attr-getstackaddr) (`1d2cb8c5`, one commit on `main` 0f863c10). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is (#3433 carried my `truncate` this way). No open PR adds it (`tools/pr_overlap.py --branch` reports no overlap; the 127 open PRs were also checked by title). - `pthread_attr_getstackaddr_nid_postfix(attr, stack_addr)` in `Pthread/Posix/Attr.cpp`, next to `pthread_attr_getstack`: `EINVAL` for a null or destroyed attribute or a null output, otherwise the attribute's `stackAddress`, as FreeBSD libthr's `_pthread_attr_getstackaddr` (`lib/libthr/thread/thr_attr.c`) does. A fresh attribute reports a null address, as libthr's default `stackaddr_attr`. - `guest_pthread_attr` gains: the address set by `pthread_attr_setstack` reads back, null output and null attribute return 22, a destroyed attribute returns 22, and a freshly initialised attribute reports null. **Tested** on Fedora 44 (kernel 7.2.8, GCC 16.2.1, Ninja, Release, full build with `BUILD_TESTING=ON`, Intel Arc Meteor Lake iGPU): - `guest_pthread_attr` passes 3/3 (`--repeat until-fail:3`). - `ctest -j6 -E "^agc_driver_"`: 534/534. - `tools/check_conventions.py --base origin/main` and `git diff --check` pass. - Table method: catalog release ZIPs checked against their sha256, `eboot.bin` and bundled modules unwrapped from their SELF containers, `relinker --registry`, `tools/import_audit.py` against `.prx` files built from `main` 0f863c10 and from the branch. In every title the one import that disappears is `DxmIMUQ-wXY`. The titles were not run. Not tested on Windows. AI-assisted: yes (Claude Code).
blawesom commented 2026-10-11 13:08:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-11T13:08:33Z.


Independent verification on Linux (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, BUILD_TESTING=ON.

  • Rebased 1d2cb8c59 onto current main: applies cleanly, no conflicts.
  • tools/check_conventions.py --base origin/main and git diff --check pass.
  • The pthread attr tests pass, including the new getstackaddr cases.
  • Full suite: 832/832 passed (all tests including the Vulkan suites on AMD RX 9070 XT / RADV).

The rebased branch is available at blawesom:verify/3488 for anyone carrying — the commit is otherwise unchanged.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6109353522 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3488#issuecomment-6109353522). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-11T13:08:33Z. --- Independent verification on **Linux** (the gap noted in the report): CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, `BUILD_TESTING=ON`. - Rebased `1d2cb8c59` onto current `main`: applies cleanly, no conflicts. - `tools/check_conventions.py --base origin/main` and `git diff --check` pass. - The pthread attr tests pass, including the new getstackaddr cases. - Full suite: **832/832 passed** (all tests including the Vulkan suites on AMD RX 9070 XT / RADV). The rebased branch is available at [`blawesom:verify/3488`](https://github.com/blawesom/AnyPS5/tree/verify/3488) for anyone carrying — the commit is otherwise unchanged.
blawesom commented 2026-10-12 05:53:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by blawesom on 2026-10-12T05:53:03Z.


Implementation note for housekeeping: pthread_attr_getstackaddr landed on main via #3494 (merged 2026-10-11).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118586853 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3488#issuecomment-6118586853). Originally posted by [blawesom](https://github.com/blawesom) on 2026-10-12T05:53:03Z. --- Implementation note for housekeeping: `pthread_attr_getstackaddr` landed on `main` via #3494 (merged 2026-10-11).
oneandonlydean commented 2026-10-12 06:17:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-12T06:17:19Z.


Closing: fixed by #3494 (pthread_attr_getstackaddr, Pthread/Posix/Attr.cpp:86). Reopen if it is still unresolved on current main.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6118859544 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3488#issuecomment-6118859544). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-12T06:17:19Z. --- Closing: fixed by #3494 (`pthread_attr_getstackaddr`, `Pthread/Posix/Attr.cpp:86`). Reopen if it is still unresolved on current main.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3488
No description provided.