-
-
Notifications
You must be signed in to change notification settings - Fork 970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TLS Malloc Fixes #1073
TLS Malloc Fixes #1073
Conversation
So Mac doesn't like printing a pthread? Is there any better way to identify the thread that would work on all OSes? For now I've disabled printing the thread id. I will update the pr (and fix clang format) when I know of a better solution. |
Swapped to draft, as I need to revert this change for Mac specifically, as the game this issue occurs in cannot be tested on Mac yet. I will update this when I have the chance. |
Disables heap malloc calls on Linux, as there are games where the heap malloc causes a crash. Note that the assert had to be modified, as pthread_gethandle is a winpthreads specific method. Also fixes a minor oversight that caused games not to perform TLS mallocs on Windows when there was no heap api.
233b9cb
to
0661c59
Compare
Should be ready for testing now. |
Tried this on Linux with BloodBorne. No notable change in behavior either for good or bad. Still hangs in Kernel same as main branch so I'm not sure how useful of a test this is, but the output is attached. Have yet to dump other games from my system so I haven't tried other games. |
@camdrit Thanks for the test. This PR isn't expected to help Bloodborne, as that game needs work on pthreads to progress further on Linux. If you do end up dumping any other games, feel free to test those. |
I'm closing this PR, as #1440 better resolves the issues this PR was designed to fix. |
In games like Attack on Titan 2, the current heap API implementation can cause issues specific to Linux. By disabling the heap API malloc calls, like we do on Windows, these games can progress further. If you're in the shadPS4 discord, this message will provide more context: https://discordapp.com/channels/1080089157554155590/1258386683691274361/1288493573200810005
Also fixes a minor oversight in the Windows TLS code, where no malloc calls were made if there was no heap_api provided by the game. This appears to fix inconsistent crashes when testing Uncharted 4 on Windows.