cmd/compile: arm64 r16, r17 register conflict between external linker and duffcopy in latest go release #46924
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?We build our Go app on arm64. In a recent version, we encountered a segment violation error when it run. The problem is similar to that of #32773, but this time it occurs in different functions. Our product has a problem in
runtime·duffcopy
.Here is a brief analysis of the segment error process
This is our product assembly code for a function,
then go to the duffcopy assembly code
the duffcopy's plan9 assembly code is
so the
br x16
will jump into 0x0910a0e8,So at this time the address in x21 (actually get value from the r16) is the address of the code segment. Then it went wrong
Actually @cherrymui submitted the CL184437 has already fixed this problem to some extend, but this CL still do not backport to the go1.16 or go1.15, so I strongly hope that the CL184437 can backport to the go1.16 version.
Does this issue reproduce with the latest release?
Yes
The text was updated successfully, but these errors were encountered: