cmd/internal/obj, runtime: use register map to mark unsafe points
Currently we use stack map index -2 to mark unsafe points, i.e. PC ranges that is not safe for async preemption. This has a problem: it cannot mark CALL instructions, because for stack scan a valid stack map index is needed. This CL switches to use register map index for marking unsafe points instead, which does not conflict with stack scan and can be applied on CALL instructions. This is necessary as next CL will mark call to morestack nonpreemptible. For #35470. Change-Id: I357bf26c996e1fee1e7eebe4e6bb07d62930d3f7 Reviewed-on: https://go-review.googlesource.com/c/go/+/207349Reviewed-by: David Chase <drchase@google.com>
Showing
Please register or sign in to comment