aboutsummaryrefslogtreecommitdiff
path: root/src/plugin/plugin_test.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2021-02-19 06:01:25 -0500
committerRuss Cox <rsc@golang.org>2021-02-19 16:09:17 +0000
commit02e5a8fdfcc8e237f5b55618ccbe9ad845014427 (patch)
tree111de57074d94e075524e2c824a091c849940a3e /src/plugin/plugin_test.go
parentfa18f224c378f5831210077944e5df718efb8df5 (diff)
downloadgo-02e5a8fdfcc8e237f5b55618ccbe9ad845014427.tar.xz
runtime: ignore SPWRITE in syscall functions
netbsd/amd64's Syscall9 changes SP using ADD and SUB, which are treated as SPWRITEs (they are not accounted for in the sp-adjust tracking, and there are too many functions that would report mismatched stack adjustments at RET if they were). A traceback starting in Syscall9 as saved by entersyscall complains about the SPWRITE-ness unnecessarily, since the PC/SP are saved at the start of the function. Ignore SPWRITE in that case. netbsd/arm's Syscall6 also changes SP (R13), using a direct write. So even if we could handle the ADD/SUB in the amd64 case or rewrote that assembly, we'd still be stuck with a more difficult problem in this case. Ignoring the SPWRITE fixes it. Example crashes: https://build.golang.org/log/160fc7b051a2cf90782b75a99984fff129329e66 https://build.golang.org/log/7879e2fecdb400eee616294285e1f952e5b17301 Change-Id: I0c8e9696066e90dafed6d4a93d11697da23f0080 Reviewed-on: https://go-review.googlesource.com/c/go/+/294072 Reviewed-by: Cherry Zhang <cherryyz@google.com> Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/plugin/plugin_test.go')
0 files changed, 0 insertions, 0 deletions