Commit 98dd205f authored by Jason A. Donenfeld's avatar Jason A. Donenfeld
Browse files

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 #44679.

Change-Id: I0199ebe7cd113379c5fa35c27932d913df79092a
Reviewed-on: https://go-review.googlesource.com/c/go/+/297390


Trust: Jason A. Donenfeld <Jason@zx2c4.com>
Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: default avatarRuss Cox <rsc@golang.org>
parent 46ffbec1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment