]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix unsafeValue handles OLSH/ORSH wrong
authorLE Manh Cuong <cuong.manhle.vn@gmail.com>
Sun, 7 Jul 2019 16:08:20 +0000 (23:08 +0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 9 Jul 2019 01:49:44 +0000 (01:49 +0000)
commit06ef108cec98b3dfc0fba3f49e733a18eb9badd5
tree6f6398348771a24e410e19ea1282b68a6e8575bd
parenta19c0ceda59b2223ca873b61f059c8ccb447fa80
cmd/compile: fix unsafeValue handles OLSH/ORSH wrong

For OLSH/ORSH, the right node is not a uintptr-typed. However,
unsafeValue still be called recursively for it, causing the
compiler crashes.

To fixing, the right node only needs to be evaluated
for side-effects, so just discard its value.

Fixes #32959

Change-Id: I34d5aa0823a0545f6dad1ec34774235ecf11addc
Reviewed-on: https://go-review.googlesource.com/c/go/+/185039
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
src/cmd/compile/internal/gc/escape.go
test/fixedbugs/issue32959.go [new file with mode: 0644]