mirror of
https://github.com/hanzoai/visor.git
synced 2026-09-24 17:04:14 +00:00
github.com/google/gvisor/pull/14531 exposed a race window with stub threads setting ThreadID and the sentry reading it. If the sentry attempted to interrupt a stub that in the process of switching a context back, it could have read an invalid thread ID along with a context state that indicated it was still being worked on. This window has existed before #14531, but was relatively benign; with that CL, the window became punishable by subprocess death. The (mostly generated) test seems to reliably test the race-window in case things get reordered in some future refactor. Fixes #14531. PiperOrigin-RevId: 974868738