go/test/fixedbugs
David Chase 0e02cfb369 cmd/compile: try harder to not use an empty src.XPos for a bogus line
The fix for #35652 did not guarantee that it was using a non-empty
src position to replace an empty one.  The new code checks again
and falls back to a more certain position.  (The input in question
compiles to a single empty infinite loop, and none of the actual instructions
had any source position at all.  That is a bug, but given the pathology
of this input, not one worth dealing with this late in the release cycle,
if ever.)

Literally:

00000 (5) TEXT "".f(SB), ABIInternal
00001 (5) PCDATA $0, $-2
00002 (5) PCDATA $1, $-2
00003 (5) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
00004 (5) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
00005 (5) FUNCDATA $2, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
b2
00006 (?) XCHGL AX, AX
b6
00007 (+1048575) JMP 6
00008 (?) END

TODO: Add runtime.InfiniteLoop(), replace infinite loops with a call to
that, and use an eco-friendly runtime.gopark instead.  (This was Cherry's
excellent idea.)

Updates #35652
Fixes #35695

Change-Id: I4b9a841142ee4df0f6b10863cfa0721a7e13b437
Reviewed-on: https://go-review.googlesource.com/c/go/+/207964
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
2019-11-22 03:06:22 +00:00
..
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:48:57 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-12-13 15:11:31 -08:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2014-07-16 19:27:10 -04:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:30 -05:00
2013-06-20 08:21:14 +02:00
2012-08-25 10:16:02 +02:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2012-02-18 22:15:42 +01:00
2015-07-11 14:36:33 +00:00
2012-08-25 10:16:02 +02:00
2012-09-28 08:30:30 -07:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:30 -05:00
2012-02-16 23:49:59 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:59 -05:00
2012-02-16 23:49:59 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:59 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:59 -05:00
2012-02-16 23:49:59 -05:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:59 -05:00
2019-03-13 18:24:02 +00:00
2012-02-16 23:49:59 -05:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:49:59 -05:00
2012-02-16 23:49:59 -05:00
2012-02-16 23:49:59 -05:00
2012-08-25 10:16:02 +02:00
2012-02-16 23:50:37 -05:00
2012-02-18 22:15:42 +01:00
2012-02-16 23:50:37 -05:00
2015-07-11 14:36:33 +00:00
2015-07-11 14:36:33 +00:00
2012-09-28 08:30:30 -07:00
2018-10-18 04:57:41 +00:00
2013-12-12 17:18:12 -08:00
2013-12-12 17:18:12 -08:00
2013-12-12 17:18:12 -08:00
2013-03-15 09:03:45 +01:00
2013-06-28 23:08:07 +02:00
2019-03-13 18:24:02 +00:00
2019-03-13 18:24:02 +00:00
2017-09-19 18:08:50 +00:00
2016-04-25 19:20:40 +00:00
2016-05-08 22:59:43 +00:00
2017-09-15 02:39:16 +00:00
2016-09-04 00:15:41 +00:00
2016-12-08 23:22:37 +00:00
2016-10-12 14:57:26 +00:00
2017-05-18 21:33:05 +00:00
2017-09-08 20:10:48 +00:00
2017-09-08 20:10:48 +00:00
2019-09-08 17:28:20 +00:00
2019-03-15 19:05:53 +00:00
2019-04-24 19:55:13 +00:00
2019-07-18 11:34:23 +00:00
2019-07-18 17:24:59 +00:00