Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
runtime: see whether gp==nil before checking preemption state
Recent we changed from using gFromTLS to using gFromSP, which apparently sometimes returns nil. This causes crashes when dereferenced. Fix that by not checking for preemption in the case that gFromSP returns nil. Fixes golang#44679. Change-Id: I0199ebe7cd113379c5fa35c27932d913df79092a Reviewed-on: https://go-review.googlesource.com/c/go/+/297390 Trust: Jason A. Donenfeld <[email protected]> Run-TryBot: Jason A. Donenfeld <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Russ Cox <[email protected]>
- Loading branch information