]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: resurrect clobberdead mode
authorCherry Zhang <cherryyz@google.com>
Fri, 12 Mar 2021 23:38:02 +0000 (18:38 -0500)
committerCherry Zhang <cherryyz@google.com>
Wed, 17 Mar 2021 17:50:50 +0000 (17:50 +0000)
commit8628bf9a972993bdb978b7d6fa7a6bb1ca2cddbe
tree04e0ff18d1bf9b20531aeb9572a6237502e9fb58
parent0bd308ff27822378dc2db77d6dd0ad3c15ed2e08
cmd/compile: resurrect clobberdead mode

This CL resurrects the clobberdead debugging mode (CL 23924).
When -clobberdead flag is set (TODO: make it GOEXPERIMENT?), the
compiler inserts code that clobbers all dead stack slots that
contains pointers.

Mark windows syscall functions cgo_unsafe_args, as the code
actually does that, by taking the address of one argument and
passing it to cgocall.

Change-Id: Ie09a015f4bd14ae6053cc707866e30ae509b9d6f
Reviewed-on: https://go-review.googlesource.com/c/go/+/301791
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/compile/internal/base/flag.go
src/cmd/compile/internal/liveness/plive.go
src/cmd/compile/internal/test/clobberdead_test.go [new file with mode: 0644]
src/runtime/syscall_windows.go
test/codegen/clobberdead.go [new file with mode: 0644]