]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: handle degenerate entry blocks in -N debug gen
authorThan McIntosh <thanm@google.com>
Tue, 4 May 2021 20:18:56 +0000 (16:18 -0400)
committerThan McIntosh <thanm@google.com>
Wed, 5 May 2021 01:47:58 +0000 (01:47 +0000)
commit66ce8aa88d144338868b0d3ab8c895608a460750
tree903f4f6119631b072a83fc71ecaa2fbf74c1d0e9
parent4df662fb373480b5055e645120558bb536fae42c
cmd/compile: handle degenerate entry blocks in -N debug gen

The code that created DWARF debug var locations for input parameters
in the non-optimized case for regabi was not doing the right thing for
degenerate functions with infinite loops. Detect these cases and don't
try to emit the normal location data.

Fixes #45948.

Change-Id: I2717fc4bac2e03d5d850a6ec8a09ed05fed0c896
Reviewed-on: https://go-review.googlesource.com/c/go/+/316752
Trust: Than McIntosh <thanm@google.com>
Run-TryBot: Than McIntosh <thanm@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/ssa/debug.go
test/fixedbugs/issue45948.go [new file with mode: 0644]