]> Cypherpunks repositories - gostls13.git/commit
runtime: fix saved PC/SP after safe-point function in syscall
authorAustin Clements <austin@google.com>
Mon, 13 Jul 2015 22:30:10 +0000 (18:30 -0400)
committerAustin Clements <austin@google.com>
Wed, 15 Jul 2015 21:09:16 +0000 (21:09 +0000)
commite42413cecc17bfd963ffe01341aad8dd42b9b816
tree5e3d857f13a9c307bb48e850ffb901cee2b2e766
parentedfc9797252d5b49ed453b2ee5434dc8f521fc2d
runtime: fix saved PC/SP after safe-point function in syscall

Running a safe-point function on syscall entry uses systemstack() and
hence clobbers g.sched.pc and g.sched.sp. Fix this by re-saving them
after the systemstack, just like in the other uses of systemstack in
reentersyscall.

Change-Id: I47868a53eba24d81919fda56ef6bbcf72f1f922e
Reviewed-on: https://go-review.googlesource.com/12125
Reviewed-by: Russ Cox <rsc@golang.org>
src/runtime/proc1.go