diff options
author | Austin Clements <austin@google.com> | 2018-06-21 16:56:13 -0400 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2018-06-22 00:28:25 +0000 |
commit | 4991bc6257a9e9d922f7b6e29e393d764c4e4295 (patch) | |
tree | d5783224ef0e0392d2395cbf0b1ab6fdf510e65e /api | |
parent | 011ea87921cb37dc8e4147d99c22234f875d2651 (diff) | |
download | go-4991bc6257a9e9d922f7b6e29e393d764c4e4295.tar.gz go-4991bc6257a9e9d922f7b6e29e393d764c4e4295.zip |
runtime: avoid recursive panic on bad lock count
Currently, if lock or unlock calls throw because the g.m.lock count is
corrupted, we're unlikely to get a stack trace because startpanic_m
will itself attempt to acquire a lock, causing a recursive failure.
Avoid this by forcing the g.m.locks count to a sane value if it's
currently bad.
This might be enough to get a stack trace from #25128.
Change-Id: I52d7bd4717ffae94a821f4249585f3eb6cd5aa41
Reviewed-on: https://go-review.googlesource.com/120416
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'api')
0 files changed, 0 insertions, 0 deletions