ci: fix the Linux build and the macOS SRT walker test crashes #1922
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!1922
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1922/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?
@MrBigBritches on GitHub · 2026-10-26 19:46 UTC · original
MrBigBritches:fix-linux-macos-ci→main· +46 −11 · 3 files · 3 commits · merged 2026-10-27 05:26 UTCUpstream
mainhas been failing CI on Linux and macOS. Windows is unaffected.Linux: the build fails (since
3c622697)textureCache.cppcallsstd::any_ofonInlinePageOwnerList::const_iterator, which doesn't declare the standard iterator member types. libstdc++ looks upstd::iterator_traits<It>::iterator_categoryto choose an algorithm, so the call doesn't compile there. MSVC's STL and libc++ don't need these types forstd::any_of, so Windows and macOS built.graphics: give InlinePageOwnerList's const_iterator iterator traitsdeclaresiterator_category,value_type,difference_type,pointerandreference. The category isstd::input_iterator_tag, becauseoperator*returns a copy and so can't meet the forward-iterator requirements.tests: assert InlinePageOwnerList's const_iterator has an input categoryadds astatic_assertinImagePageTableTests.cpp, so removing the type names fails the build on every platform, not only on Linux CI.macOS:
scalar_provenance,resource_materializationandresource_trackingsegfault (since8291cfeb)The SRT walker lets guest loads fault on purpose, and the tests'
FakeGuestMemoryserves those faults from a fake reader. It only installed its handler on Linux and Windows. On macOS nothing caught the fault, so the process crashed. The emulator's own handler already supports macOS, so only the tests were affected.tests: serve SRT walker test loads on macOS tooshares the Linuxsigactionpath with macOS. It reads the registers from the macOS thread state (uc_mcontext->__ss), likex64InstructionEmulator.cppdoes. It also catchesSIGBUSas well asSIGSEGVon macOS, likehostException.cpp. Linux behaviour is unchanged.Testing
ctestresults are unchanged frommain: 63 of 65 pass. The two failures were already onmainand aren't affected by this PR:vdecswdoesn't build, becausestd::aligned_allocisn't available on MSVC's C runtime.kernel_file_systemcrashes with0xc0000028.@coderabbitai[bot] on GitHub · 2026-10-26 19:51 UTC · original
Walkthrough
The page owner const iterator now declares standard input-iterator traits, and a compile-time test checks its iterator category. FakeGuestMemory now installs and restores fault handlers on Linux and macOS. The POSIX handler uses platform-specific context fields and handles the configured fault signals.
Suggested reviewers:
nmzikPriority:
Normal
Change: Bug fix
Merge Risk:
Low · up to
bd8abThe reported CI fix is not shown to be blocked, but the iterator contract remains incomplete. Add postfix increment before relying on the iterator in other generic code.
Pre-merge checks:
4 ·
1
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@ -119,2 +120,4 @@class const_iterator final {public:// libstdc++'s algorithms need these. Input, not forward, because operator* returns a copy.using iterator_category = std::input_iterator_tag;@coderabbitai[bot] on GitHub · 2026-10-26 19:51 UTC · original · edited 2026-10-26 20:57 UTC
Implement postfix increment before declaring an input iterator.
std::input_iterator_tagadvertises an input iterator, butconst_iteratoronly defines prefixoperator++(). Generic code that requiresit++will fail to compile. Add a postfix overload that returns the previous iterator value.Proposed fix
@coderabbitai[bot] on GitHub · 2026-10-26 19:51 UTC · original · reviewed
Actionable comments posted: 1
ffe36814-801e-480b-b652-218dde40c7cbReviewing files that changed from the base of the PR and between
f90a8b1589andbd8abcdeb0.src/graphics/host_gpu/renderer/cache/multiLevelPageTable.htests/ImagePageTableTests.cpptests/SrtWalkerTestMemory.hIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
@ -119,2 +120,4 @@class const_iterator final {public:// libstdc++'s algorithms need these. Input, not forward, because operator* returns a copy.using iterator_category = std::input_iterator_tag;@MrBigBritches on GitHub · 2026-10-26 20:57 UTC · original
Nothing does this today, so it was a conscious decision to skip it. This would only matter if someone later uses this iterator with
std::rangesor to build astd::vector.@ -119,2 +120,4 @@class const_iterator final {public:// libstdc++'s algorithms need these. Input, not forward, because operator* returns a copy.using iterator_category = std::input_iterator_tag;@coderabbitai[bot] on GitHub · 2026-10-26 20:57 UTC · original
@MrBigBritches Understood. You intentionally limited the iterator to its current callers. The missing postfix increment limits generic iterator compatibility, but I have not identified a current caller that needs it. I won’t press for this change in this PR.
You are interacting with an AI system.