]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix a premature-deallocation of state in loopreschedchecks
authorJunyang Shao <shaojunyang@google.com>
Sat, 30 Nov 2024 04:15:07 +0000 (04:15 +0000)
committerJunyang Shao <shaojunyang@google.com>
Tue, 3 Dec 2024 16:22:55 +0000 (16:22 +0000)
commita8be834912fae7e1f3f5cfc39e6a15f8782efc4d
treebeb6ff52c86c0192ec05a5acaee9486ee5049624
parent485ed2fa5b5e0b7067ef72a0f4bdc9ca12b77ed7
cmd/compile: fix a premature-deallocation of state in loopreschedchecks

lastMems is free-ed before it's actually used. This results in the pass
breaking: multiple mem phis will present in the instrumented ssa, and
essentially break tighten
pass(https://cs.opensource.google/go/go/+/master:src/cmd/compile/internal/ssa/tighten.go;l=240).

This CL fix that.

Change-Id: I30cf0c3300ed59d1a15d978757a3840fbe04484d
Reviewed-on: https://go-review.googlesource.com/c/go/+/632516
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/loopreschedchecks.go