]> Cypherpunks repositories - gostls13.git/commit
runtime: don't crash holding locks on racy timer access
authorIan Lance Taylor <iant@golang.org>
Fri, 1 Jun 2018 17:16:08 +0000 (10:16 -0700)
committerIan Lance Taylor <iant@golang.org>
Mon, 4 Jun 2018 18:33:41 +0000 (18:33 +0000)
commitd6c3b0a56d8c81c221b0adf69ae351f7cd467854
treeedea6fb95f6cc34504642db1920a627834455d90
parentcf2c2ea89d09d486bb018b1817c5874388038c3a
runtime: don't crash holding locks on racy timer access

If we run into data corruption due to the program accessing timers in
a racy way, do a normal panic rather than a hard crash with "panic
holding locks". The hope is to make the problem less confusing for users.

Fixes #25686

Change-Id: I863417adf21f7f8c088675b67a3acf49a0cdef41
Reviewed-on: https://go-review.googlesource.com/115815
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/time.go
src/time/time_test.go