mirror of
https://github.com/golang/go
synced 2024-11-17 21:04:43 -07:00
66ce8aa88d
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>
17 lines
307 B
Go
17 lines
307 B
Go
// compile -N
|
|
|
|
// Copyright 2021 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// Issue 45948: assert in debug generation for degenerate
|
|
// function with infinite loop.
|
|
|
|
package p
|
|
|
|
func f(p int) {
|
|
L:
|
|
goto L
|
|
|
|
}
|