]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.12] cmd/compile: call ginsnop, not ginsnop2 on ppc64le for mid...
authorLynn Boger <laboger@linux.vnet.ibm.com>
Thu, 21 Feb 2019 19:48:52 +0000 (14:48 -0500)
committerIan Lance Taylor <iant@golang.org>
Mon, 25 Feb 2019 18:58:45 +0000 (18:58 +0000)
commitefc6d86965a21def9afcec65d3c96486667949ad
tree10236772d92ccbde2a96bfa9fe27da93028a04c3
parenta718f939d258f184709e95e581657fb8f1a6f8a8
[release-branch.go1.12] cmd/compile: call ginsnop, not ginsnop2 on ppc64le for mid-stack inlining tracebacks

A recent change to fix stacktraces for inlined functions
introduced a regression on ppc64le when compiling position
independent code. That happened because ginsnop2 was called for
the purpose of inserting a NOP to identify the location of
the inlined function, when ginsnop should have been used.
ginsnop2 is intended to be used before deferreturn to ensure
r2 is properly restored when compiling position independent code.
In some cases the location where r2 is loaded from might not be
initialized. If that happens and r2 is used to generate an address,
the result is likely a SEGV.

This fixes that problem.

Fixes #30283

Change-Id: If70ef27fc65ef31969712422306ac3a57adbd5b6
Reviewed-on: https://go-review.googlesource.com/c/163337
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Andrew Bonventre <andybons@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
(cherry picked from commit 2d3474043cd35ba06d3566df520e8550c479944f)
Reviewed-on: https://go-review.googlesource.com/c/163717
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/amd64/galign.go
src/cmd/compile/internal/arm/galign.go
src/cmd/compile/internal/arm64/galign.go
src/cmd/compile/internal/gc/go.go
src/cmd/compile/internal/gc/ssa.go
src/cmd/compile/internal/mips/galign.go
src/cmd/compile/internal/mips64/galign.go
src/cmd/compile/internal/ppc64/galign.go
src/cmd/compile/internal/s390x/galign.go
src/cmd/compile/internal/wasm/ssa.go
src/cmd/compile/internal/x86/galign.go