aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/exec_linux_test.go
diff options
context:
space:
mode:
authorWANG Xuerui <git@xen0n.name>2023-03-11 22:38:01 +0800
committerM Zhuo <mzh@golangcn.org>2023-03-15 07:19:39 +0000
commit71f82df19a7595b422d9dbc7d05530bd824a9114 (patch)
tree547f5e26cf6dd957458020624fe4d40496c66f04 /src/syscall/exec_linux_test.go
parent7789966286a97c2e60140c7108c6df8238436dbe (diff)
downloadgo-71f82df19a7595b422d9dbc7d05530bd824a9114.tar.xz
cmd/link/internal/loong64: use BREAK 0 as the code pad sequence
As the comment on CodePad goes, we "might want to pad with a trap instruction to catch wayward programs". The current behavior of zero-padding is equivalent to padding with an instruction of 0x00000000, which is invalid according to the LoongArch manuals nevertheless, but rumor has it that some early and/or engineering samples of Loongson 3A5000 recognized it (maybe behaving like NOP). It is better to avoid undocumented behavior and ensure execution flow would not overflow the pads. Change-Id: I531b1eabeb355e9ad4a2d5340e61f2fe71349297 Reviewed-on: https://go-review.googlesource.com/c/go/+/475616 Reviewed-by: abner chenc <chenguoqi@loongson.cn> Reviewed-by: Ian Lance Taylor <iant@google.com> Run-TryBot: Cherry Mui <cherryyz@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com>
Diffstat (limited to 'src/syscall/exec_linux_test.go')
0 files changed, 0 insertions, 0 deletions