]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj: save link register in leaf function with non-empty frame on PPC64...
authorCherry Zhang <cherryyz@google.com>
Mon, 24 Oct 2016 02:32:16 +0000 (22:32 -0400)
committerCherry Zhang <cherryyz@google.com>
Tue, 25 Oct 2016 21:44:32 +0000 (21:44 +0000)
commit698bfa17a842890043098b972446e9b8dbc20841
treed3fc81ee536fdf8ef9a44374ae12a8000fd60ca9
parentcf73bbfa259afe29962a5ca5e207441f63c9bcf2
cmd/internal/obj: save link register in leaf function with non-empty frame on PPC64, ARM64, S390X

The runtime traceback code assumes non-empty frame has link
link register saved on LR architectures. Make sure it is so in
the assember.

Also make sure that LR is stored before update SP, so the traceback
code will not see a half-updated stack frame if a signal comes
during the execution of function prologue.

Fixes #17381.

Change-Id: I668b04501999b7f9b080275a2d1f8a57029cbbb3
Reviewed-on: https://go-review.googlesource.com/31760
Reviewed-by: Michael Munday <munday@ca.ibm.com>
src/cmd/internal/obj/arm64/obj7.go
src/cmd/internal/obj/ppc64/obj9.go
src/cmd/internal/obj/s390x/objz.go
test/fixedbugs/issue17381.go [new file with mode: 0644]