]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: add missing OASOP case in mayModifyPkgVar
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Fri, 29 Mar 2024 23:09:57 +0000 (06:09 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 2 Apr 2024 17:16:14 +0000 (17:16 +0000)
commit5038ce82b628e195af703168422e139e7faf1485
treed4ca3599af3c0f7aaf1deab6f0d0e8b06abff36d
parent973befe714d43ebb3f04a583cc136ffe8909b344
cmd/compile: add missing OASOP case in mayModifyPkgVar

CL 395541 made staticopy safe, stop applying the optimization once
seeing an expression that may modify global variables. However, it
misses the case for OASOP expression, causing the static init
mis-recognizes the modification and think it's safe.

Fixing this by adding missing OASOP case.

Fixes #66585

Change-Id: I603cec018d3b5a09825c14e1f066a0e16f8bde23
Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-longtest
Reviewed-on: https://go-review.googlesource.com/c/go/+/575216
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/staticinit/sched.go
test/fixedbugs/issue66585.go [new file with mode: 0644]