]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] cmd/internal/obj: fix inline marker issue on s390x
authorMichael Munday <mike.munday@ibm.com>
Mon, 10 Aug 2020 15:01:21 +0000 (08:01 -0700)
committerDmitri Shuralyov <dmitshur@golang.org>
Thu, 10 Sep 2020 18:30:06 +0000 (18:30 +0000)
commit77029b76b01fbb4dbeda57664ef62e98efbc2440
tree3d7b075a67ec3cc5ebc1ab20dcac9c227f2f739d
parent26a85c3634b8b5dc9cf8adb30664dac0ddc6acf0
[release-branch.go1.14] cmd/internal/obj: fix inline marker issue on s390x

The optimization that replaces inline markers with pre-existing
instructions assumes that 'Prog' values produced by the compiler are
still reachable after the assembler has run. This was not true on
s390x where the assembler was removing NOP instructions from the
linked list of 'Prog' values. This led to broken inlining data
which in turn caused an infinite loop in the runtime traceback code.

Fix this by stopping the s390x assembler backend removing NOP
values. It does not make any difference to the output of the
assembler because NOP instructions are 0 bytes long anyway.

Note: compiler check omitted from backport to reduce risk of change.

Fixes #40694.

Change-Id: I9f9bdbe895c3478549b5e7e623f9521f841e926a
Reviewed-on: https://go-review.googlesource.com/c/go/+/248477
Run-TryBot: Michael Munday <mike.munday@ibm.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/internal/obj/s390x/objz.go