Repository: go
Issue: go/types: SIGSEGV in (*Checker).exprInternal
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- log ~ `SIGSEGV(.*\n)*\ngoroutine \d+ \[.+\]:\n(\s*.+\n)*go/types\.\(\*Checker\)\.(?:rawExpr|exprInternal)`
```

[2020-03-01T21:04:30-a4f7b08/darwin-amd64-nocgo](https://build.golang.org/log/5bf8057cb3fef78574cf666b1c6c06198d423825)

<details>

```
    go_test.go:2345: # strings_test
        panic: runtime error: invalid memory address or nil pointer dereference [recovered]
        	panic: runtime error: invalid memory address or nil pointer dereference
        [signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x1215e20]
        
        goroutine 1 [running]:
        go/types.(*Checker).handleBailout(0xc000131680, 0xc00067f9f0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/check.go:243 +0x98
        panic(0x12fe680, 0x15c1cf0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/runtime/panic.go:967 +0x15d
        go/types.(*Checker).exprInternal(0xc000131680, 0xc0001c3d80, 0x0, 0x0, 0x0, 0x0, 0x30)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1526 +0x1980
        go/types.(*Checker).rawExpr(0xc000131680, 0xc0001c3d80, 0x0, 0x0, 0x0, 0x0, 0x132b060)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:987 +0x81
        go/types.(*Checker).exprOrType(0xc000131680, 0xc0001c3d80, 0x0, 0x0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1644 +0x55
        go/types.(*Checker).call(0xc000131680, 0xc0001c3d80, 0xc00027f080, 0x4)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/call.go:15 +0x66
        go/types.(*Checker).exprInternal(0xc000131680, 0xc0001c3d80, 0x13ce0c0, 0xc00027f080, 0x0, 0x0, 0x11fbb58)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1471 +0x1e61
        go/types.(*Checker).rawExpr(0xc000131680, 0xc0001c3d80, 0x13ce0c0, 0xc00027f080, 0x0, 0x0, 0x1)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:987 +0x81
        go/types.(*Checker).multiExpr(0xc000131680, 0xc0001c3d80, 0x13ce0c0, 0xc00027f080)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1601 +0x58
        go/types.(*Checker).expr(0xc000131680, 0xc0001c3d80, 0x13ce0c0, 0xc00027f080)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1595 +0x49
        go/types.(*Checker).exprInternal(0xc000131680, 0xc0001c3d80, 0x13ce1c0, 0xc00027f140, 0x13cb340, 0xc0000dce60, 0x100bb95)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1145 +0x15be
        go/types.(*Checker).rawExpr(0xc000131680, 0xc0001c3d80, 0x13ce1c0, 0xc00027f140, 0x13cb340, 0xc0000dce60, 0x100c438)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:987 +0x81
        go/types.(*Checker).exprWithHint(0xc000131680, 0xc0001c3d80, 0x13ce1c0, 0xc00027f140, 0x13cb340, 0xc0000dce60)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1623 +0x73
        go/types.(*Checker).indexedElts(0xc000131680, 0xc000246c00, 0xf, 0x10, 0x13cb340, 0xc0000dce60, 0xffffffffffffffff, 0xd)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:957 +0x1e2
        go/types.(*Checker).exprInternal(0xc000131680, 0xc0001c3400, 0x13ce1c0, 0xc00027f440, 0x0, 0x0, 0x0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1200 +0x584
        go/types.(*Checker).rawExpr(0xc000131680, 0xc0001c3400, 0x13ce1c0, 0xc00027f440, 0x0, 0x0, 0x0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:987 +0x81
        go/types.(*Checker).multiExpr(0xc000131680, 0xc0001c3400, 0x13ce1c0, 0xc00027f440)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1601 +0x58
        go/types.(*Checker).expr(0xc000131680, 0xc0001c3400, 0x13ce1c0, 0xc00027f440)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/expr.go:1595 +0x49
        go/types.(*Checker).varDecl(0xc000131680, 0xc000071220, 0xc00000f148, 0x1, 0x1, 0x0, 0x0, 0x13ce1c0, 0xc00027f440)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/decl.go:445 +0x187
        go/types.(*Checker).objDecl(0xc000131680, 0x13d3ca0, 0xc000071220, 0x0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/decl.go:189 +0x666
        go/types.(*Checker).packageObjects(0xc000131680)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/resolver.go:570 +0x390
        go/types.(*Checker).checkFiles(0xc000131680, 0xc00025fc00, 0x7, 0x8, 0x0, 0x0)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/check.go:257 +0xa3
        go/types.(*Checker).Files(...)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/check.go:248
        go/types.(*Config).Check(0xc000358ac0, 0xc00012abd0, 0xc, 0xc00019c880, 0xc00025fc00, 0x7, 0x8, 0xc00035c5a0, 0x0, 0x16, ...)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/go/types/api.go:348 +0x14e
        cmd/vendor/golang.org/x/tools/go/analysis/unitchecker.run(0xc00019c880, 0xc000134c60, 0xc000164600, 0x15, 0x20, 0x2e746c7573, 0x13d4660, 0x12fed40, 0xc00012a81c, 0xc000143c10)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go:235 +0x42a
        cmd/vendor/golang.org/x/tools/go/analysis/unitchecker.Run(0x7ffeefbff749, 0x83, 0xc000164600, 0x15, 0x20)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go:131 +0x113
        cmd/vendor/golang.org/x/tools/go/analysis/unitchecker.Main(0xc000164600, 0x15, 0x20)
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go:118 +0x25f
        main.main()
        	/private/var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/vet/main.go:35 +0x2bd
        
    go_test.go:2345: go [test -cover -short math strings] failed unexpectedly in /var/folders/9w/4l2_g3kx01x199n37fbmv3s80000gn/T/workdir-host-darwin-10_14/go/src/cmd/go: exit status 2
```

</details>

This may be related to #36605, although the failures reported for that issue are supposed to be fixed in 1.14 and at tip (https://github.com/golang/go/issues/36605#issuecomment-576924501).

CC @matloob @griesemer