From c112289ee4141ebc31db50328c355b01278b987b Mon Sep 17 00:00:00 2001 From: David Chase Date: Fri, 17 Jan 2020 12:03:55 -0500 Subject: [PATCH] cmd/compile: change the "bogus line" to be 1 The previous value was "too bogus" and caused objdump to crash. Updated infinite loop test results (only run if -args -f) in ssa/debug_test.go Probably also fixes #36621 but that bug needs more info to tell for certain. Fixes #36570 Change-Id: I51144641d25d559308a98d726d87806bd340cc5a Reviewed-on: https://go-review.googlesource.com/c/go/+/215297 Run-TryBot: David Chase TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor Reviewed-by: Cherry Zhang --- .../compile/internal/ssa/testdata/infloop.dlv-opt.nexts | 8 ++++---- src/cmd/internal/src/pos.go | 2 +- src/cmd/objdump/testdata/fmthello.go | 6 ++++++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/cmd/compile/internal/ssa/testdata/infloop.dlv-opt.nexts b/src/cmd/compile/internal/ssa/testdata/infloop.dlv-opt.nexts index 19496de660..0b9f06f85d 100644 --- a/src/cmd/compile/internal/ssa/testdata/infloop.dlv-opt.nexts +++ b/src/cmd/compile/internal/ssa/testdata/infloop.dlv-opt.nexts @@ -2,11 +2,11 @@ 6: func test() { 8: go func() {}() 10: for { -1048575: +1: package main 10: for { -1048575: +1: package main 10: for { -1048575: +1: package main 10: for { -1048575: +1: package main 10: for { diff --git a/src/cmd/internal/src/pos.go b/src/cmd/internal/src/pos.go index 60c7c91cde..861d9188b1 100644 --- a/src/cmd/internal/src/pos.go +++ b/src/cmd/internal/src/pos.go @@ -305,7 +305,7 @@ type lico uint32 // because they have almost no interaction with other uses of the position. const ( lineBits, lineMax = 20, 1<