Files
Konstantin BogomolovandgVisor bot cb3de545ca Close exposed race window in stub ThreadID setting.
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
2026-09-01 21:01:37 -07:00
..