Commit f9504fc
Fix Windows CI: revert to CONTEXT_CONTROL for GetThreadContext/SetThreadContext
CONTEXT_FULL was corrupting the target thread's register state because
SetThreadContext would overwrite all integer and floating-point registers
with the captured (but potentially stale) values. Since our preempt_asm
assembly already saves and restores ALL registers (GPRs, XMMs, RFLAGS),
we only need CONTEXT_CONTROL to redirect RIP/RSP to preempt_asm.
The previous coroutine_preemptive timeout with CONTEXT_CONTROL was caused
by the monitor retrying preemption on already-preempted threads (the
double-preemption bug fixed in commit 445f5ea). With that fix in place,
CONTEXT_CONTROL is correct and sufficient.
Agent-Logs-Url: https://github.com/acl-dev/open-coroutine/sessions/9f2a2552-802a-4dff-8448-e97277e5ac70
Co-authored-by: loongs-zhang <38336731+loongs-zhang@users.noreply.github.com>1 parent bca37d9 commit f9504fc
1 file changed
Lines changed: 10 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | | - | |
253 | | - | |
254 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
255 | 256 | | |
256 | | - | |
257 | | - | |
| 257 | + | |
| 258 | + | |
258 | 259 | | |
259 | 260 | | |
260 | 261 | | |
| |||
0 commit comments