]> Cypherpunks repositories - gostls13.git/commit
sync: throw, not panic, for unlock of unlocked mutex
authorRhys Hiltner <rhys@justin.tv>
Thu, 7 Dec 2017 21:38:16 +0000 (13:38 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 8 Dec 2017 13:40:21 +0000 (13:40 +0000)
commitf72196647e017e834f65dc7264b844e0a2760490
treeb1d2cb6b0350ebbef00d35f8c087cd0459366ab2
parent6c877e5da7ab14f0d8a206c09f24cf51fbbc393a
sync: throw, not panic, for unlock of unlocked mutex

This was originally done in https://golang.org/cl/31359 but partially
undone (apparently unintentionally) in https://golang.org/cl/34310

Fix it, and update tests to ensure the error is unrecoverable.

Fixes #23039

Change-Id: I923ebd613a05e67d8acce77f4a68c64c8574faa6
Reviewed-on: https://go-review.googlesource.com/82656
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitry Vyukov <dvyukov@google.com>
src/sync/mutex.go
src/sync/mutex_test.go