[PR #717] [MERGED] video_core: Add bounds checking for subspan use in liverpool functions #1732

Closed
opened 2026-02-27 21:13:45 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/717
Author: @baggins183
Created: 9/1/2024
Status: Merged
Merged: 9/3/2024
Merged by: @raphaelthegreat

Base: mainHead: pt-fix-subspan


📝 Commits (1)

  • 6e56a22 video_core: Add bounds checking for subspan use in liverpool functions

📊 Changes

1 file changed (+18 additions, -4 deletions)

View changed files

📝 src/video_core/amdgpu/liverpool.cpp (+18 -4)

📄 Description

I have seen Nop packets that exceed the remaining submission length for the command list. When this happens, for me subspan underflows and returns a span with a very high, garbage size, which causes the ProcessCompute function to keep looping.
This commit adds an error message when this happens, and returns an empty span so at least the loop bails out.

Also adds stub cases for type 0 and 1 packets in ProcessCompute

Happens in CUSA01127 (PT)


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/shadps4-emu/shadPS4/pull/717 **Author:** [@baggins183](https://github.com/baggins183) **Created:** 9/1/2024 **Status:** ✅ Merged **Merged:** 9/3/2024 **Merged by:** [@raphaelthegreat](https://github.com/raphaelthegreat) **Base:** `main` ← **Head:** `pt-fix-subspan` --- ### 📝 Commits (1) - [`6e56a22`](https://github.com/shadps4-emu/shadPS4/commit/6e56a2277ef9ace741127633855f1753e3eeb7cc) video_core: Add bounds checking for subspan use in liverpool functions ### 📊 Changes **1 file changed** (+18 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `src/video_core/amdgpu/liverpool.cpp` (+18 -4) </details> ### 📄 Description I have seen Nop packets that exceed the remaining submission length for the command list. When this happens, for me subspan underflows and returns a span with a very high, garbage size, which causes the ProcessCompute function to keep looping. This commit adds an error message when this happens, and returns an empty span so at least the loop bails out. Also adds stub cases for type 0 and 1 packets in ProcessCompute Happens in CUSA01127 (PT) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 21:13:45 +03:00
Sign in to join this conversation.
No milestone
No project
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.

Dependencies

No dependencies set.

Reference
starred/shadPS4#1732
No description provided.