tests: use function pointers in the concurrent backing read pairs #1163
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!1163
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1163/head"
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?
@Nawid3333 on GitHub · 2026-10-07 20:31 UTC · original
Nawid3333:tests/vmem-pair-function-pointers→main· +3 −3 · 1 files · 1 commits · merged 2026-10-07 20:56 UTCProblem
Since
7e011fa5("memory: allow concurrent backing reads"),mainfails to build on Linux and macOS (main's own run on45b6d2c5: https://github.com/KytyPS5/KytyPS5/actions/runs/37674771741/job/112975370415):CI builds each PR merged with the current
main, so the Linux and macOS jobs of PRs built since then fail the same way.Cause
TestConcurrentBackingReadsbuilds its reader pairs asstd::pair {TryReadBacking, TryReadSparseBacking}. Class template argument deduction also considerspair'sconst T1&/const T2&constructor. Its reference parameters don't decay the function names, soT1andT2are deduced as function types. A data member can't have function type, and with libstdc++ and libc++ instantiating thatpairfails. The Windows build (clang-cl with MSVC's library) doesn't reject it, which is why Windows still builds.Fix
Take the functions' addresses (
&TryReadBacking,&TryReadSparseBacking), so the pairs hold function pointers. Three lines, test-only, no behaviour change.Testing
main45b6d2c5the build fails with the same error; with this changevirtual_memory_allocation_testsbuilds and passes.virtual_memory_allocation_testsbuilds and passes.AI use (per the README's AI policy): Claude (Anthropic) traced the failing jobs and wrote the change. Claude also ran the builds above on my machine. I reviewed the change before opening this PR.
🤖 Generated with Claude Code
@Nmzik on GitHub · 2026-10-07 20:56 UTC · original
@Nawid3333 Thanks )