FEX/Source
Ryan Houdek 362cccc210 Syscalls: Fixes invalid register invalidation
FEX was incorrectly invalidating RBX and RBP when a new
thread/clone/fork was created. Only RAX should be set to zero to
signify that it is the child process.

I tried to find some reference as to why this was being done in FEX, and
I seem to recall some code somewhere that was setting up this state.

Sadly I can't seem to find any reference to this being required now by
the linux kernel when it creates new processes, so maybe I was just
gaslighting myself.

Fixes crash in bubblewrap where it was expecting a valid RBP to exist
after it does a clone syscall.

I have unit tests coming for this but it is uncovering some more bugs in
FEX's thread handling. Some of which are getting fixed with the current
PRs that are moving the thread handling to the frontend.

But since proton is broken now, this needs to get in.
2023-12-19 16:01:21 -08:00
..
2023-11-14 12:54:54 -08:00