Skip to content

Conversation

kalaposfos13
Copy link
Member

@kalaposfos13 kalaposfos13 commented Sep 4, 2025

Currently, if SIGBUS is hit, it'll just get silently skipped, which is not desirable if for example a game enters into an infinite loop of raising SIGBUS on a single instruction. I wasn't sure if I should make this an unreachable though, but given that so far no one complained about randomly hitting this while using a debugger, it might be the better choice, especially given that all three cases I've this this being hit the games either crashed anyway immediately after or hung. It should be mentioned that out of the three cases, two was messing around with things that changed memory allocations such as isNeo, and the third time was on PS4 Linux

@squidbus
Copy link
Collaborator

squidbus commented Sep 4, 2025

I see two problems with this:

  • This signal handler already uses UNREACHABLE if the signal was not from accessing GPU-tracked memory or from a unpatched & patchable instruction. Neither of these cases should log due to performance reasons.
  • Some OS use SIGBUS for the above mentioned cases so you will be logging errors on every single GPU-tracked page signal.

@kalaposfos13
Copy link
Member Author

Is there any way to differentiate SIGBUS coming from the GPU side and the CPU side? My examples were all ones that happened right after booting and before graphics were initialized

@squidbus
Copy link
Collaborator

squidbus commented Sep 4, 2025

Is there any way to differentiate SIGBUS coming from the GPU side and the CPU side? My examples were all ones that happened right after booting and before graphics were initialized

Check through to the signal handlers in cpu_patches and page_manager, they should return false for cases that don't apply to them which would then fall through to the UNREACHABLE. If a case is applicable for those handlers it becomes very difficult to distinguish.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants