]> Cypherpunks repositories - gostls13.git/commit
runtime: make consistentHeapStats acquire/release nosplit
authorMichael Anthony Knyszek <mknyszek@google.com>
Wed, 3 Nov 2021 18:49:51 +0000 (18:49 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 5 Nov 2021 17:52:30 +0000 (17:52 +0000)
commitdf1837799d418eed6b4921cd1252dd8eae76cd98
tree48e37a8198b3aef339b91bebf78e0f2abc658637
parent6f32d2050d7f0a9d0c529a1a7a21aa8c1d63fa20
runtime: make consistentHeapStats acquire/release nosplit

consistentHeapStats is updated during a stack allocation, so a stack
growth during an acquire or release could cause another acquire to
happen before the operation completes fully. This may lead to an invalid
sequence number.

Fixes #49395.

Change-Id: I41ce3393dff80201793e053d4d6394d7b211a5b7
Reviewed-on: https://go-review.googlesource.com/c/go/+/361158
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/mstats.go