aboutsummaryrefslogtreecommitdiff
path: root/test/nosplit.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2015-07-29 15:15:03 -0400
committerRuss Cox <rsc@golang.org>2015-07-29 21:37:12 +0000
commit034a10d44c8f83d2c36ab4e242c14e9744c54949 (patch)
tree052b319ed96a465814d80397f89ffa74b14cb071 /test/nosplit.go
parent767e065809937229767bb3496fdce61b74b815e1 (diff)
downloadgo-034a10d44c8f83d2c36ab4e242c14e9744c54949.tar.gz
go-034a10d44c8f83d2c36ab4e242c14e9744c54949.zip
cmd/internal/obj/arm64: reject misaligned stack frames, except empty frames
The layout code has to date insisted on stack frames that are 16-aligned including the saved LR, and it ensured this by growing the frame itself. This breaks code that refers to values near the top of the frame by positive offset from SP, and in general it's too magical: if you see TEXT xxx, $N, you expect that the frame size is actually N, not sometimes N and sometimes N+8. This led to a serious bug in the compiler where ambiguously live values were not being zeroed correctly, which in turn triggered an assertion in the GC about finding only valid pointers. The compiler has been fixed to always emit aligned frames, and the hand-written assembly has also been fixed. Now that everything is aligned, make unaligned an error instead of something to "fix" silently. For #9880. Change-Id: I05f01a9df174d64b37fa19b36a6b6c5f18d5ba2d Reviewed-on: https://go-review.googlesource.com/12848 Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'test/nosplit.go')
-rw-r--r--test/nosplit.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/nosplit.go b/test/nosplit.go
index 596962b2c1..e5c2a9f30e 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -295,7 +295,7 @@ TestCases:
}
}
- if size%ptrSize == 4 {
+ if size%ptrSize == 4 || goarch == "arm64" && size != 0 && (size+8)%16 != 0 {
continue TestCases
}
nosplit := m[3]