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
17 lines
322 B
Python
17 lines
322 B
Python
load("//tools:defs.bzl", "go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
go_library(
|
|
name = "testutil",
|
|
testonly = 1,
|
|
srcs = [
|
|
"testutil_amd64.go",
|
|
"testutil_arm64.go",
|
|
],
|
|
visibility = ["//pkg/sentry/platform/systrap:__pkg__"],
|
|
)
|