Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/compile: fix position of fake receivers; be more careful in logopt
The src.NoXPos in fake receivers was leaking, through a series of mishaps, all the way to logopt. If done just so, this can lead to a compiler crash. This makes logopt crash-proof and eliminates the root cause as well. I'm reluctant to write a test for this because it's kinda slow and involved; my working test is "compile something that mentions the flag package with -json=0,$TMPDIR flag, then be sure that $TMPDIR/flag/__unnamed__.json was not created". Change-Id: I384b717c0e7522953d22d61f7e06319e11192d7d Reviewed-on: https://go-review.googlesource.com/c/go/+/443156 Run-TryBot: David Chase <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
- Loading branch information