Skip to content

fix(tools): count only definitions as exports in the overlap report - #8

Merged
SleglJan merged 131 commits into
mainfrom
fix/tools-pr-overlap-declarations
Oct 9, 2026
Merged

SleglJan merged 131 commits into
mainfrom
fix/tools-pr-overlap-declarations

Conversation

@SleglJan

@SleglJan SleglJan commented Oct 8, 2026

Copy link
Copy Markdown
Owner

What

tools/pr_overlap.py took every added line with APS5_VABI before a name and a parenthesis as an export, so a declaration such as extern "C" int* APS5_VABI __error_nid_postfix();, which many source files add to reach the guest errno, made each pull request that adds it "implement the same function" as all the others. The reports of boykopovar#1641 and boykopovar#1727 each list five such rows.

The export collection moves into exports(diff), which skips a line that ends in a semicolon. In the tree every declaration the pattern matches ends that way (206 lines), and a definition's first line ends in {, }, ( or , (3086 lines); no declaration is split over lines, so none is lost.

Overlap: boykopovar#1325 changes open_prs in the same file and adds tools/tests/test_pr_overlap.py, boykopovar#988 changes its __main__ output; this change is in scan and its own test file, so they merge in any order. boykopovar#1662 and boykopovar#1623 add an add_test at the same place in the root CMakeLists.txt; whichever merges second rebases two lines.

Tested

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 in TechnicalDebt
  • 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
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

Raghav314 and others added 30 commits October 8, 2026 05:54
The driver created a windowless Vulkan device at the first dispatch and
replaced it with a windowed one at the first flip. The replacement built a
second device and re-imported every host import, and the first flip paid
for it.

VideoOut now creates its window when it starts (the first VideoOut call),
at the default 1920x1080 output, and attaches it to the driver
(AgcDriverAttachWindow) before the call returns. The driver creates its
device with that window, so GPU work and presentation use one device.
Present no longer creates or replaces a device. A device created by GPU
work before VideoOut started is still replaced, now in AttachWindow.

A failure to create the window or the device is thrown from that first
VideoOut call instead of terminating the presentation thread.

Tests:
- video_out_flip_tests onedevice: GPU work, then a flip, leaves one device.
- pacing makes its first presentation span vblanks with GPU work queued
  ahead of the flip; it relied on the device being created at the flip.
- unavailable expects the failure from sceVideoOutOpen.
- guest_video_out_wqhd_detection writes a param.json for the window title
  and is skipped without a display or Vulkan device unless
  ANYPS5_REQUIRE_DISPLAY is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The segment filter dropped every header in the PT_LOOS..PT_HIOS range,
which includes PT_GNU_EH_FRAME. The unwinders find the executable's
unwind tables through that header, so no C++ exception thrown in the
main executable could be caught on Linux.

The header is kept only when the output program header table still fits
in the input's table; otherwise it is dropped as before, with a warning.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
…flip-compute

# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
sceUltFinalize cleared gUlthreads directly, dropping the last
shared_ptr to an UltUlthreadState while its worker thread still held
the raw pointer passed to scePthreadCreate. Finalize now returns
ULT_ERROR_BUSY when an ulthread is still registered, before any global
state is torn down, following the BUSY convention of the queue,
semaphore and queue data pool destroy paths. Joining the ulthread
remains the caller's responsibility, as sceUltUlthreadJoin already
keeps the state alive across scePthreadJoin and erases it afterwards.
guest_errors sets errno to 13 and checks at the end that the strerror_r
calls left it alone, but a std::thread is created and joined in between.
Guest errno is the host's errno. Since glibc 2.42, pthread_create first
tries madvise(MADV_GUARD_INSTALL) for the new thread's stack guard.
Kernels before 6.13, including WSL2's 6.6, reject it with EINVAL, and
glibc falls back to mprotect with errno left at EINVAL. POSIX leaves
errno unspecified after a successful call, so the test aborts on Ubuntu
26.04 (glibc 2.43) under WSL2 without anything being wrong.

Check errno right after the strerror calls, and set it to 13 again after
the join, so every errno check covers only strerror and strerror_r.
The storage image and sampled texture caches each let go of their least
recently used entries past a fixed 2 GiB, and a sampled view of a
storage image counted that image a second time.

The storage image cache keeps a quarter of the largest device-local
heap, at least the 2 GiB of before (TextureCacheBudget). The sampled
cache gets what VK_EXT_memory_budget leaves on that heap after the
memory in use outside sampled textures and cached storage images, the
storage cache's budget and an eighth of the heap budget, read at most
once a second and at least 2 GiB; without the extension it keeps the
storage cache's rule. A snapshot counts its image allocation, a texture
still bound after leaving the cache counts as sampled memory, and a
change of more than 10% is logged at most every 10 s. A nonzero
APS5_TEXTURE_CACHE_MIB sets both budgets; a view of a cached storage
image counts nothing and leaves the cache when its image does.
PPSA13427 imports sceHttpSetAuthInfoCallback (jf4TB2nUO40), which no
library exported, so the relinked title failed to load. No request
reaches the network, so no server asks for authentication: the
callback is accepted and never called. The signature and callback
type follow shadPS4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HeC9bA3n74TzJRYv9AgBE8
sceSaveDataMount3 with SCE_SAVE_DATA_MOUNT_MODE_CREATE2 opens a save that
already exists, so its mount status is 0 rather than CREATED, as shadPS4's
savedata.cpp reports. A CREATE mount still reports CREATED.
It returned the network error, which titles that poll their epoll treat
as fatal. No request is ever pending, since sending fails at once, so the
wait now times out with no events; an infinite wait throws.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ured

feat(shader): implement MIMG BY2/BY4 loads as measured on hardware
ci: save the compiler cache before the tests
AF_UNIX pairs as FreeBSD 11 makes them: SOCK_STREAM, SOCK_DGRAM and
SOCK_SEQPACKET with protocol 0, SOCK_NONBLOCK applied to both ends and
SOCK_CLOEXEC accepted, EAFNOSUPPORT for an unknown family, EOPNOTSUPP
for AF_INET and AF_INET6, EPROTONOSUPPORT for type 0 or a protocol,
EPROTOTYPE for another type, EFAULT for a null output, and nothing
written on failure. The ends are guest sockets, so send, recv,
shutdown, fcntl, poll and close work on them; getsockname and
getpeername report the unnamed AF_UNIX address, recvfrom and recvmsg
no address for a stream and the unnamed one for a datagram. On Linux
the pair is the host's socketpair; on Windows a loopback TCP connection
or two connected UDP sockets, and SOCK_SEQPACKET throws. The remaining
differences from the console are recorded in TechnicalDebt.

OpenSSL's QUIC notifier in 15 catalog titles creates such a pair.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
ci: repeat the tests three times on main only
Measured on a PS5 (firmware 13.60) through dlopen of libSceAudioOut.sprx:
a MAIN (type 0) port accepts 1, 2, 8 or 12 channels (bits 8-11) with
sample type 0 or 1 (bits 0-6). Bit 7 without 8 channels returns
0x80268001, any other unsupported format returns 0x8026800E, and both
write UINT64_MAX to the output handle. Bits 12-31 do not affect the
result. Other port types keep their current validation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
feat(shader): implement MIMG PCK2/PCK4 loads as measured on hardware
boykopovar and others added 28 commits October 9, 2026 11:58
…ed-builds

ci(build): require manual full builds and auto-test relinker for contr
…ers-test-includes

fix(tests): add SPIRV-Headers to the tests that include VulkanTestDevice.hpp
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-merge

fix(ci): restore all builds and tests on main pushes
…mage-cache-size

perf(agc): size the storage and sampled texture caches to the device
…ice-mediaplay

feat(libSceSystemService): implement Disable/ReenableMediaPlay
…-fused

test(shader): check v_fma_mix_f32 in FmaRounding
…returns-buffer

fix(libSceAmpr): sceAmprCommandBufferClearBuffer returns the detached buffer
test(agc): run agc_driver_mesh_tests under ctest
…e-kill-app

feat(libSceSystemService): let the running title close itself with sceSystemServiceKillApp
…g-exports

feat(libs): provide the exports PPSA01289 imports that no library has
…ing-term

feat(libSceAudioOut): accept sceAudioOut2MasteringTerm
…ication

fix(oracle): publish cached executable only after successful build
fix(hw-oracle): assemble wave64 bodies in wave64 mode
fix(tools): decode overlap command output as UTF-8
…tpair

feat(libkernel): implement socketpair
…mport-texture-reuploads

fix(win): windows host import texture reuploads
…-ref

ci(build): build pull requests merged into current main
…amdgpu-skip

fix(hw-oracle): skip the wave64 assembly test when clang has no AMDGPU target
…-eh-frame-hdr

fix(relinker): keep PT_GNU_EH_FRAME in the relinked executable
…utput-shutdown

fix(agc): stop the profile output at shutdown only if it was created
pr_overlap.py took every added line with APS5_VABI before a name and a
parenthesis as an export, so a declaration such as
extern "C" int* APS5_VABI __error_nid_postfix(); made each pull request
that adds it "implement the same function" as all the others. A line
that ends in a semicolon is a declaration and is skipped; every
definition's first line in the tree ends in a brace, a parenthesis or
a comma.

Registers pr_overlap_exports.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@SleglJan
SleglJan force-pushed the fix/tools-pr-overlap-declarations branch from 9d3da7f to db7666b Compare October 9, 2026 12:44
@SleglJan
SleglJan merged commit 103c315 into main Oct 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.