]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: don't ICE on unaligned offsets for pointer writes
authorKeith Randall <khr@golang.org>
Sat, 8 Jul 2023 15:46:37 +0000 (08:46 -0700)
committerKeith Randall <khr@golang.org>
Mon, 10 Jul 2023 16:29:42 +0000 (16:29 +0000)
commitc4db811e44662fe59233e4445c5dc001579f1243
tree08ed101b2d7b1db3d5205c59abff47a0d9f5c21f
parent5c154986094bcc2fb28909cc5f01c9ba1dd9ddd4
cmd/compile: don't ICE on unaligned offsets for pointer writes

User code is unlikely to be correct, but don't crash the compiler
when the offset of a pointer in an object is not a multiple of the
pointer size.

Fixes #61187

Change-Id: Ie56bfcb38556c5dd6f702ae4ec1d4534c6acd420
Reviewed-on: https://go-review.googlesource.com/c/go/+/508555
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssa/writebarrier.go
test/fixedbugs/issue61187.go [new file with mode: 0644]