From: zhangjian Date: Sun, 11 Jun 2023 11:29:55 +0000 (+0000) Subject: cmd/compile/internal/liveness: remove excess bits for stackmap X-Git-Tag: go1.22rc1~1002 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=05d4b57c9fd082c8f68f454d1bb4ae26a3c7f5b9;p=gostls13.git cmd/compile/internal/liveness: remove excess bits for stackmap ArgWidth() already includes the stack space required for input parameters and return values, so their offset will not exceed the value of ArgWidth(), so there is no need to double it. Change-Id: I10fde7afbf2a5714b5142075c2116af14debc7e8 GitHub-Last-Rev: eaf3fd5eb86ed1d968a6d5962c71ee3144424598 GitHub-Pull-Request: golang/go#60591 Reviewed-on: https://go-review.googlesource.com/c/go/+/500675 Reviewed-by: Keith Randall Reviewed-by: Heschi Kreinick Run-TryBot: guangyuan zhou TryBot-Result: Gopher Robot Reviewed-by: Keith Randall --- diff --git a/src/cmd/compile/internal/liveness/plive.go b/src/cmd/compile/internal/liveness/plive.go index 85e988aeda..e4dbfa9fa3 100644 --- a/src/cmd/compile/internal/liveness/plive.go +++ b/src/cmd/compile/internal/liveness/plive.go @@ -1520,7 +1520,7 @@ func WriteFuncMap(fn *ir.Func, abiInfo *abi.ABIParamResultInfo) { return } nptr := int(abiInfo.ArgWidth() / int64(types.PtrSize)) - bv := bitvec.New(int32(nptr) * 2) + bv := bitvec.New(int32(nptr)) for _, p := range abiInfo.InParams() { typebits.SetNoCheck(p.Type, p.FrameOffset(abiInfo), bv)