Improve synchapi impls; fix heap races & 64-bit fixes

This commit is contained in:
2025-11-10 18:15:33 -07:00
parent 2494b541b7
commit 6c4f332705
22 changed files with 1260 additions and 144 deletions

View File

@@ -815,7 +815,7 @@ def emit_cc_thunk64(f: FuncInfo | TypedefInfo, lines: List[str]):
if sys.platform != "darwin":
# Restore FS base
lines.append("\tmov r9, qword ptr [rbx+TEB_FSBASE]")
lines.append("\twrfsbase r9")
lines.append("\tWRITE_FSBASE r9, rbx")
# Stash guest stack in r10
lines.append("\tmov r10, rsp")