fix(reverse): avoid stopping Wine during probes

Repeated SIGSTOP-based injection can suspend Wine while its Win16 mutex is held
and eventually strand the timer callback. Make the short process-memory write
sequence the default between 30 ms callbacks, while retaining whole-process
stopping as an explicit single-probe diagnostic option.

Test Plan:
- `ruff check original/tools/trace_original_state.py original/tools/inject_original_state.py` -- passed
- live no-stop ball-state injection -- passed
- subsequent original timer updates remained observable
- `git diff --cached --check` -- passed
This commit is contained in:
2026-08-22 20:52:03 +02:00
parent 7caf460022
commit 5c2a80cfa5
2 changed files with 11 additions and 4 deletions
+6 -1
View File
@@ -56,6 +56,11 @@ def parse_args() -> argparse.Namespace:
choices=range(1, 6),
help="temporarily force the original physics substep count",
)
parser.add_argument(
"--stop-process",
action="store_true",
help="stop all Wine threads during writes; unsafe for repeated Win16 mutex probes",
)
return parser.parse_args()
@@ -91,7 +96,7 @@ def main() -> None:
args = parse_args()
verify_original()
pid = args.pid if args.pid is not None else find_winevdm_pid()
resume_afterward = stop_process(pid)
resume_afterward = stop_process(pid) if args.stop_process else False
try:
with ProcessMemory(pid, writable=True) as memory:
data_base = locate_data_segment(memory)