]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: use call block instead of entry block for tail call expansion
authorKeith Randall <khr@golang.org>
Wed, 9 Oct 2024 16:36:41 +0000 (09:36 -0700)
committerKeith Randall <khr@golang.org>
Wed, 9 Oct 2024 18:20:35 +0000 (18:20 +0000)
commit5428570af7f668c840569a596cb1c23644f408cf
tree7b942dfb15c2e7bf2f801bbd18c5d1e5c19a25b2
parent935bf1395c47088d3455722452b28f18084f1450
cmd/compile: use call block instead of entry block for tail call expansion

The expand-calls pass assumed that tail calls were always done in the
entry block. That used to be true, but with tail calls in wrappers
(enabled by CL 578235) and libfuzzer instrumentation, that is no
longer the case. Libfuzzer instrumentation adds an IF statement to the
start of the wrapper function.

Fixes #69825

Change-Id: I9ab7133691d8235f9df128be39bff154b0b8853b
Reviewed-on: https://go-review.googlesource.com/c/go/+/619075
Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssa/expand_calls.go
test/fixedbugs/issue69825.go [new file with mode: 0644]