[PR #3819] [MERGED] Avoid storing the Tcb pointer on the stack #3736

Closed
opened 2026-02-27 22:04:48 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/shadps4-emu/shadPS4/pull/3819
Author: @kalaposfos13
Created: 11/19/2025
Status: Merged
Merged: 11/21/2025
Merged by: @squidbus

Base: mainHead: fix-tcb


📝 Commits (5)

  • 87ef08a Avoid storing the Tcb pointer on the stack
  • d16b282 Just return the already stored pointer in GetTcbBase
  • 4ebfbf8 Replace uses of GetTcbBase with g_curthread->tcb
  • 82f9dfb copyright 2025
  • b156e32 sir clang offnir, the all-formatting

📊 Changes

4 files changed (+8 additions, -32 deletions)

View changed files

📝 src/core/libraries/fiber/fiber.cpp (+4 -4)
📝 src/core/linker.cpp (+2 -2)
📝 src/core/tls.cpp (+1 -22)
📝 src/core/tls.h (+1 -4)

📄 Description

This PR fixes some of the random crashes in SotC on Linux.


🔄 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/3819 **Author:** [@kalaposfos13](https://github.com/kalaposfos13) **Created:** 11/19/2025 **Status:** ✅ Merged **Merged:** 11/21/2025 **Merged by:** [@squidbus](https://github.com/squidbus) **Base:** `main` ← **Head:** `fix-tcb` --- ### 📝 Commits (5) - [`87ef08a`](https://github.com/shadps4-emu/shadPS4/commit/87ef08a7d9088bdfa08b9e66b9120b5b0ba66e0c) Avoid storing the Tcb pointer on the stack - [`d16b282`](https://github.com/shadps4-emu/shadPS4/commit/d16b2822db51374b2aa6dd4cb45f04b234f3c427) Just return the already stored pointer in GetTcbBase - [`4ebfbf8`](https://github.com/shadps4-emu/shadPS4/commit/4ebfbf8e0b9edc08e8e0a3d3024ac85a7f48a6e2) Replace uses of GetTcbBase with g_curthread->tcb - [`82f9dfb`](https://github.com/shadps4-emu/shadPS4/commit/82f9dfbc810a9d2db970ba86fad456ea193288e2) copyright 2025 - [`b156e32`](https://github.com/shadps4-emu/shadPS4/commit/b156e32a352687383db626704d75abd04daebf9b) sir clang offnir, the all-formatting ### 📊 Changes **4 files changed** (+8 additions, -32 deletions) <details> <summary>View changed files</summary> 📝 `src/core/libraries/fiber/fiber.cpp` (+4 -4) 📝 `src/core/linker.cpp` (+2 -2) 📝 `src/core/tls.cpp` (+1 -22) 📝 `src/core/tls.h` (+1 -4) </details> ### 📄 Description This PR fixes some of the random crashes in SotC on Linux. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 22:04:48 +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#3736
No description provided.