Commit Graph

9 Commits

Author SHA1 Message Date
gVisor bot 86cb33a031 Merge release-20210208.0-73-gf80a857a4 (automated) 2021-02-18 23:35:57 +00:00
Michael Pratt f80a857a4f Bump build constraints to Go 1.18
These are bumped to allow early testing of Go 1.17. Use will be audited closer
to the 1.17 release.

PiperOrigin-RevId: 358278615
2021-02-18 15:30:58 -08:00
gVisor bot a8329e99c5 Merge release-20201109.0-89-g3454d5721 (automated) 2020-11-19 22:32:43 +00:00
Michael Pratt 3454d57219 Require sync.Mutex to lock and unlock from the same goroutine
We would like to track locks ordering to detect ordering violations. Detecting
violations is much simpler if mutexes must be unlocked by the same goroutine
that locked them.

Thus, as a first step to tracking lock ordering, add this lock/unlock
requirement to gVisor's sync.Mutex. This is more strict than the Go standard
library's sync.Mutex, but initial testing indicates only a single lock that is
used across goroutines. The new sync.CrossGoroutineMutex relaxes the
requirement (but will not provide lock order checking).

Due to the additional overhead, enforcement is only enabled with the
"checklocks" build tag. Build with this tag using:

bazel build --define=gotags=checklocks ...

From my spot-checking, this has no changed inlining properties when disabled.

Updates #4804

PiperOrigin-RevId: 343370200
2020-11-19 14:29:34 -08:00
gVisor bot c94b57b692 Merge release-20201030.0-94-ga1cb52447 (automated) 2020-11-13 22:50:52 +00:00
Jamie Liu bf392dcc7d Allow goid.Get() to be used outside of race builds.
PiperOrigin-RevId: 342179912
2020-11-12 19:16:29 -08:00
Bin Lu ba27514083 add arm64 support to goid
Adding a method to get g on Arm64

Signed-off-by: Bin Lu <bin.lu@arm.com>
2020-05-13 04:35:47 -04:00
Adin Scannell d29e59af9f Standardize on tools directory.
PiperOrigin-RevId: 291745021
2020-01-27 12:21:00 -08:00
Ian Gudger 6b83111499 goid: new package
Allows retrieving the goroutine ID for concurrency testing when the race
detector is enabled.

Updates #1472

PiperOrigin-RevId: 289155308
2020-01-10 13:34:48 -08:00